[yum] update to latest HEAD

James Antill james at fedoraproject.org
Fri Feb 14 20:05:16 UTC 2014


commit 3c827a827aeb652e310e55a1f5b58e6d3bb0e232
Author: James Antill <james at and.org>
Date:   Fri Feb 14 15:05:54 2014 -0500

    update to latest HEAD
    
    - Minor fixes/cleanups for yum fs diff.
    - Fix update-minimal traceback and ignoring updates. BZ 1048584.

 yum-HEAD.patch |   90 +++++++++++++++++++++++++++++++-------------------------
 yum.spec       |    7 ++++-
 2 files changed, 56 insertions(+), 41 deletions(-)
---
diff --git a/yum-HEAD.patch b/yum-HEAD.patch
index 550ba1e..23ebfa0 100644
--- a/yum-HEAD.patch
+++ b/yum-HEAD.patch
@@ -198689,7 +198689,7 @@ index 2cb1acb..a62bc00 100644
          ret = u''
 diff --git a/yum/updateinfo.py b/yum/updateinfo.py
 new file mode 100644
-index 0000000..1cc207f
+index 0000000..8d91f88
 --- /dev/null
 +++ b/yum/updateinfo.py
 @@ -0,0 +1,526 @@
@@ -199208,7 +199208,7 @@ index 0000000..1cc207f
 +            if extcmds and not _match_sec_cmd(extcmds, name, notice):
 +                continue
 +            if (not ndata and
-+                not _ysp_should_filter_pkg(base, name, notice, used_map)):
++                not _ysp_should_filter_pkg(opts, name, notice, used_map)):
 +                continue
 +            txmbrs.extend(base.update(name=pkgtup[0], arch=pkgtup[1],
 +                                      epoch=pkgtup[2],
@@ -200331,7 +200331,7 @@ index e5e9ece..35359e2 100644
          fo = None
  
 diff --git a/yumcommands.py b/yumcommands.py
-index 4dcbea7..b4e172c 100644
+index 4dcbea7..4e3b730 100644
 --- a/yumcommands.py
 +++ b/yumcommands.py
 @@ -13,6 +13,7 @@
@@ -200342,7 +200342,7 @@ index 4dcbea7..b4e172c 100644
  # Written by Seth Vidal
  
  """
-@@ -20,18 +21,22 @@ Classes for subcommands of the yum command line interface.
+@@ -20,18 +21,23 @@ Classes for subcommands of the yum command line interface.
  """
  
  import os
@@ -200360,6 +200360,7 @@ index 4dcbea7..b4e172c 100644
 -from yum.i18n import utf8_width, utf8_width_fill, to_unicode
 +from yum.i18n import utf8_width, utf8_width_fill, to_unicode, exception2msg
 +import tempfile
++import shutil
 +import glob
  
  import yum.config
@@ -200367,7 +200368,7 @@ index 4dcbea7..b4e172c 100644
  
  def _err_mini_usage(base, basecmd):
      if basecmd not in base.yum_cli_commands:
-@@ -43,16 +48,24 @@ def _err_mini_usage(base, basecmd):
+@@ -43,16 +49,24 @@ def _err_mini_usage(base, basecmd):
      base.logger.critical(txt)
  
  def checkRootUID(base):
@@ -200395,7 +200396,7 @@ index 4dcbea7..b4e172c 100644
      if not base.gpgKeyCheck():
          for repo in base.repos.listEnabled():
              if (repo.gpgcheck or repo.repo_gpgcheck) and not repo.gpgkey:
-@@ -75,31 +88,117 @@ For more information contact your distribution or package provider.
+@@ -75,31 +89,117 @@ For more information contact your distribution or package provider.
                  raise cli.CliError
  
  def checkPackageArg(base, basecmd, extcmds):
@@ -200513,7 +200514,7 @@ index 4dcbea7..b4e172c 100644
  
      for cmd in extcmds:
          if cmd not in VALID_ARGS:
-@@ -108,12 +207,14 @@ def checkCleanArg(base, basecmd, extcmds):
+@@ -108,12 +208,14 @@ def checkCleanArg(base, basecmd, extcmds):
              raise cli.CliError
  
  def checkShellArg(base, basecmd, extcmds):
@@ -200534,7 +200535,7 @@ index 4dcbea7..b4e172c 100644
      """
      if len(extcmds) == 0:
          base.verbose_logger.debug(_("No argument to shell"))
-@@ -133,10 +234,12 @@ def checkShellArg(base, basecmd, extcmds):
+@@ -133,10 +235,12 @@ def checkShellArg(base, basecmd, extcmds):
          raise cli.CliError
  
  def checkEnabledRepo(base, possible_local_files=[]):
@@ -200550,7 +200551,7 @@ index 4dcbea7..b4e172c 100644
      """
      if base.repos.listEnabled():
          return
-@@ -145,6 +248,11 @@ def checkEnabledRepo(base, possible_local_files=[]):
+@@ -145,6 +249,11 @@ def checkEnabledRepo(base, possible_local_files=[]):
          if lfile.endswith(".rpm") and os.path.exists(lfile):
              return
  
@@ -200562,7 +200563,7 @@ index 4dcbea7..b4e172c 100644
      msg = _('There are no enabled repos.\n'
              ' Run "yum repolist all" to see the repos you have.\n'
              ' You can enable repos with yum-config-manager --enable <repo>')
-@@ -152,113 +260,296 @@ def checkEnabledRepo(base, possible_local_files=[]):
+@@ -152,113 +261,296 @@ def checkEnabledRepo(base, possible_local_files=[]):
      raise cli.CliError
  
  class YumCommand:
@@ -200885,7 +200886,7 @@ index 4dcbea7..b4e172c 100644
  
  def _add_pkg_simple_list_lens(data, pkg, indent=''):
      """ Get the length of each pkg's column. Add that to data.
-@@ -289,22 +580,62 @@ def _list_cmd_calc_columns(base, ypl):
+@@ -289,22 +581,62 @@ def _list_cmd_calc_columns(base, ypl):
      return (-columns[0], -columns[1], -columns[2])
  
  class InfoCommand(YumCommand):
@@ -200955,7 +200956,7 @@ index 4dcbea7..b4e172c 100644
              update_pkgs = {}
              inst_pkgs   = {}
              local_pkgs  = {}
-@@ -341,6 +672,7 @@ class InfoCommand(YumCommand):
+@@ -341,6 +673,7 @@ class InfoCommand(YumCommand):
                          local_pkgs[(po.name, po.arch)] = po
  
              # Output the packages:
@@ -200963,7 +200964,7 @@ index 4dcbea7..b4e172c 100644
              clio = base.conf.color_list_installed_older
              clin = base.conf.color_list_installed_newer
              clir = base.conf.color_list_installed_reinstall
-@@ -348,7 +680,9 @@ class InfoCommand(YumCommand):
+@@ -348,7 +681,9 @@ class InfoCommand(YumCommand):
              rip = base.listPkgs(ypl.installed, _('Installed Packages'), basecmd,
                                  highlight_na=update_pkgs, columns=columns,
                                  highlight_modes={'>' : clio, '<' : clin,
@@ -200973,7 +200974,7 @@ index 4dcbea7..b4e172c 100644
              clau = base.conf.color_list_available_upgrade
              clad = base.conf.color_list_available_downgrade
              clar = base.conf.color_list_available_reinstall
-@@ -356,6 +690,7 @@ class InfoCommand(YumCommand):
+@@ -356,6 +691,7 @@ class InfoCommand(YumCommand):
              rap = base.listPkgs(ypl.available, _('Available Packages'), basecmd,
                                  highlight_na=inst_pkgs, columns=columns,
                                  highlight_modes={'<' : clau, '>' : clad,
@@ -200981,7 +200982,7 @@ index 4dcbea7..b4e172c 100644
                                                   '=' : clar, 'not in' : clai})
              rep = base.listPkgs(ypl.extras, _('Extra Packages'), basecmd,
                                  columns=columns)
-@@ -374,7 +709,7 @@ class InfoCommand(YumCommand):
+@@ -374,7 +710,7 @@ class InfoCommand(YumCommand):
                  for obtup in sorted(ypl.obsoletesTuples,
                                      key=operator.itemgetter(0)):
                      base.updatesObsoletesList(obtup, 'obsoletes',
@@ -200990,7 +200991,7 @@ index 4dcbea7..b4e172c 100644
              else:
                  rop = base.listPkgs(ypl.obsoletes, _('Obsoleting Packages'),
                                      basecmd, columns=columns)
-@@ -389,45 +724,160 @@ class InfoCommand(YumCommand):
+@@ -389,45 +725,160 @@ class InfoCommand(YumCommand):
              return 0, []
  
      def needTs(self, base, basecmd, extcmds):
@@ -201156,7 +201157,7 @@ index 4dcbea7..b4e172c 100644
          return True
  
   
-@@ -436,18 +886,31 @@ class GroupsCommand(YumCommand):
+@@ -436,18 +887,31 @@ class GroupsCommand(YumCommand):
  
      direct_commands = {'grouplist'    : 'list',
                         'groupinstall' : 'install',
@@ -201189,7 +201190,7 @@ index 4dcbea7..b4e172c 100644
          return _("Display, or use, the groups information")
      
      def _grp_setup_doCommand(self, base):
-@@ -459,7 +922,7 @@ class GroupsCommand(YumCommand):
+@@ -459,7 +923,7 @@ class GroupsCommand(YumCommand):
          except yum.Errors.GroupsError:
              return 1, [_('No Groups on which to run command')]
          except yum.Errors.YumBaseError, e:
@@ -201198,7 +201199,7 @@ index 4dcbea7..b4e172c 100644
  
      def _grp_cmd(self, basecmd, extcmds):
          if basecmd in self.direct_commands:
-@@ -470,6 +933,10 @@ class GroupsCommand(YumCommand):
+@@ -470,6 +934,10 @@ class GroupsCommand(YumCommand):
          else:
              cmd = 'summary'
  
@@ -201209,7 +201210,7 @@ index 4dcbea7..b4e172c 100644
          remap = {'update' : 'upgrade',
                   'erase' : 'remove',
                   'mark-erase' : 'mark-remove',
-@@ -479,32 +946,86 @@ class GroupsCommand(YumCommand):
+@@ -479,32 +947,86 @@ class GroupsCommand(YumCommand):
          return cmd, extcmds
  
      def doCheck(self, base, basecmd, extcmds):
@@ -201306,7 +201307,7 @@ index 4dcbea7..b4e172c 100644
          cmd, extcmds = self._grp_cmd(basecmd, extcmds)
  
          self._grp_setup_doCommand(base)
-@@ -514,140 +1035,573 @@ class GroupsCommand(YumCommand):
+@@ -514,140 +1036,573 @@ class GroupsCommand(YumCommand):
          if cmd == 'list':
              return base.returnGroupLists(extcmds)
  
@@ -201909,7 +201910,7 @@ index 4dcbea7..b4e172c 100644
                  ypl.obsoletes = typl.obsoletes
                  ypl.obsoletesTuples = typl.obsoletesTuples
  
-@@ -673,164 +1627,474 @@ class CheckUpdateCommand(YumCommand):
+@@ -673,164 +1628,474 @@ class CheckUpdateCommand(YumCommand):
                  for obtup in sorted(ypl.obsoletesTuples,
                                      key=operator.itemgetter(0)):
                      base.updatesObsoletesList(obtup, 'obsoletes',
@@ -202415,7 +202416,7 @@ index 4dcbea7..b4e172c 100644
          def _repo_size(repo):
              ret = 0
              for pkg in repo.sack.returnPackages():
-@@ -838,12 +2102,9 @@ class RepoListCommand(YumCommand):
+@@ -838,12 +2103,9 @@ class RepoListCommand(YumCommand):
              return base.format_number(ret)
  
          def _repo_match(repo, patterns):
@@ -202430,7 +202431,7 @@ index 4dcbea7..b4e172c 100644
                      return True
              return False
  
-@@ -857,7 +2118,10 @@ class RepoListCommand(YumCommand):
+@@ -857,7 +2119,10 @@ class RepoListCommand(YumCommand):
              arg = 'enabled'
          extcmds = map(lambda x: x.lower(), extcmds)
  
@@ -202442,7 +202443,7 @@ index 4dcbea7..b4e172c 100644
          if arg != 'disabled' or extcmds:
              try:
                  # Setup so len(repo.sack) is correct
-@@ -866,6 +2130,13 @@ class RepoListCommand(YumCommand):
+@@ -866,6 +2131,13 @@ class RepoListCommand(YumCommand):
              except yum.Errors.RepoError:
                  if verbose:
                      raise
@@ -202456,7 +202457,7 @@ index 4dcbea7..b4e172c 100644
  
          repos = base.repos.repos.values()
          repos.sort()
-@@ -924,111 +2195,113 @@ class RepoListCommand(YumCommand):
+@@ -924,111 +2196,113 @@ class RepoListCommand(YumCommand):
                  ui_enabled = dhibeg + _('disabled') + hiend
                  ui_endis_wid = utf8_width(_('disabled'))
  
@@ -202666,7 +202667,7 @@ index 4dcbea7..b4e172c 100644
  
          if not verbose and cols:
              #  Work out the first (id) and last (enabled/disalbed/count),
-@@ -1088,21 +2361,64 @@ class RepoListCommand(YumCommand):
+@@ -1088,21 +2362,64 @@ class RepoListCommand(YumCommand):
          return 0, ['repolist: ' +to_unicode(locale.format("%d", tot_num, True))]
  
      def needTs(self, base, basecmd, extcmds):
@@ -202731,7 +202732,7 @@ index 4dcbea7..b4e172c 100644
          if len(extcmds) == 0:
              base.usage()
              raise cli.CliError
-@@ -1147,82 +2463,230 @@ class HelpCommand(YumCommand):
+@@ -1147,82 +2464,230 @@ class HelpCommand(YumCommand):
          return help_output
  
      def doCommand(self, base, basecmd, extcmds):
@@ -202972,7 +202973,7 @@ index 4dcbea7..b4e172c 100644
  
          def _append_repos(cols, repo_data):
              for repoid in sorted(repo_data):
-@@ -1264,7 +2728,7 @@ class VersionCommand(YumCommand):
+@@ -1264,7 +2729,7 @@ class VersionCommand(YumCommand):
  
          if vcmd == 'groupinfo':
              for group in groups:
@@ -202981,7 +202982,7 @@ index 4dcbea7..b4e172c 100644
                      continue
                  print _(" Group   :"), group
                  print _(" Packages:")
-@@ -1284,11 +2748,35 @@ class VersionCommand(YumCommand):
+@@ -1284,11 +2749,35 @@ class VersionCommand(YumCommand):
  
              return 0, ['version groupinfo']
  
@@ -203018,7 +203019,7 @@ index 4dcbea7..b4e172c 100644
                  data = base.rpmdb.simpleVersion(not verbose, groups=groups)
                  lastdbv = base.history.last()
                  if lastdbv is not None:
-@@ -1302,15 +2790,14 @@ class VersionCommand(YumCommand):
+@@ -1302,15 +2791,14 @@ class VersionCommand(YumCommand):
                  if groups:
                      for grp in sorted(data[2]):
                          if (vcmd.startswith("group-") and
@@ -203037,7 +203038,7 @@ index 4dcbea7..b4e172c 100644
                  data = base.pkgSack.simpleVersion(not verbose, groups=groups)
                  if vcmd not in ('group-available', 'group-all'):
                      cols.append(("%s %s/%s" % (_("Available:"), rel, ba),
-@@ -1320,14 +2807,12 @@ class VersionCommand(YumCommand):
+@@ -1320,14 +2808,12 @@ class VersionCommand(YumCommand):
                  if groups:
                      for grp in sorted(data[2]):
                          if (vcmd.startswith("group-") and
@@ -203053,7 +203054,7 @@ index 4dcbea7..b4e172c 100644
  
          data = {'rid' : {}, 'ver' : {}}
          for (rid, ver) in cols:
-@@ -1344,6 +2829,14 @@ class VersionCommand(YumCommand):
+@@ -1344,6 +2830,14 @@ class VersionCommand(YumCommand):
          return 0, ['version']
  
      def needTs(self, base, basecmd, extcmds):
@@ -203068,7 +203069,7 @@ index 4dcbea7..b4e172c 100644
          vcmd = 'installed'
          if extcmds:
              vcmd = extcmds[0]
-@@ -1352,25 +2845,74 @@ class VersionCommand(YumCommand):
+@@ -1352,25 +2846,74 @@ class VersionCommand(YumCommand):
              return True
          return vcmd in ('available', 'all', 'group-available', 'group-all')
  
@@ -203144,7 +203145,7 @@ index 4dcbea7..b4e172c 100644
              return 2, ["Repeating transaction %u" % (old.tid,)]
  
      def _hcmd_undo(self, base, extcmds):
-@@ -1426,12 +2968,60 @@ class HistoryCommand(YumCommand):
+@@ -1426,12 +2969,60 @@ class HistoryCommand(YumCommand):
      def _hcmd_new(self, base, extcmds):
          base.history._create_db_file()
  
@@ -203206,7 +203207,7 @@ index 4dcbea7..b4e172c 100644
          if extcmds and extcmds[0] not in cmds:
              base.logger.critical(_('Invalid history sub-command, use: %s.'),
                                   ", ".join(cmds))
-@@ -1444,6 +3034,19 @@ class HistoryCommand(YumCommand):
+@@ -1444,6 +3035,19 @@ class HistoryCommand(YumCommand):
              raise cli.CliError
  
      def doCommand(self, base, basecmd, extcmds):
@@ -203226,7 +203227,7 @@ index 4dcbea7..b4e172c 100644
          vcmd = 'list'
          if extcmds:
              vcmd = extcmds[0]
-@@ -1468,29 +3071,88 @@ class HistoryCommand(YumCommand):
+@@ -1468,29 +3072,88 @@ class HistoryCommand(YumCommand):
              ret = self._hcmd_rollback(base, extcmds)
          elif vcmd == 'new':
              ret = self._hcmd_new(base, extcmds)
@@ -203315,7 +203316,7 @@ index 4dcbea7..b4e172c 100644
          chkcmd = 'all'
          if extcmds:
              chkcmd = extcmds
-@@ -1505,33 +3167,1685 @@ class CheckRpmdbCommand(YumCommand):
+@@ -1505,33 +3168,1694 @@ class CheckRpmdbCommand(YumCommand):
          return rc, ['%s %s' % (basecmd, chkcmd)]
  
      def needTs(self, base, basecmd, extcmds):
@@ -204314,7 +204315,7 @@ index 4dcbea7..b4e172c 100644
 +
 +        num = len(base.tsInfo)
 +        _upi.update_minimal(base, extcmds)
-+        num -= len(base.tsInfo)
++        num = len(base.tsInfo) - num
 +        
 +        if num > 0:
 +            msg = '%d packages marked for minimal Update' % num
@@ -204891,8 +204892,14 @@ index 4dcbea7..b4e172c 100644
 +        apkgs = {}
 +        downloadpkgs = []
 +        for ipkg in set(pfr['mod'].values()):
++            iyi = ipkg.yumdb_info
++            if 'from_repo' in iyi: # Updates-testing etc.
++                if iyi.from_repo in base.repos.repos:
++                    repo = base.repos.getRepo(iyi.from_repo)
++                    if not repo.isEnabled():
++                        base.repos.enableRepo(repo.id)
++
 +            for apkg in base.pkgSack.searchPkgTuple(ipkg.pkgtup):
-+                iyi = ipkg.yumdb_info
 +                if ('checksum_type' in iyi and
 +                    'checksum_data' in iyi and
 +                    iyi.checksum_type == apkg.checksum_type and
@@ -204923,6 +204930,9 @@ index 4dcbea7..b4e172c 100644
 +
 +                deal_with_file(fpath)
 +
++        if downloadpkgs:
++            shutil.rmtree(tmpdir)
++
 +    def _fs_status(self, base, extcmds):
 +        def deal_with_file(fpath):
 +            if fpath in pfr['norm']:
diff --git a/yum.spec b/yum.spec
index 2a847d3..1c9a26f 100644
--- a/yum.spec
+++ b/yum.spec
@@ -64,7 +64,7 @@ BuildRequires: bash-completion
 Summary: RPM package installer/updater/manager
 Name: yum
 Version: 3.4.3
-Release: 135%{?dist}
+Release: 136%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz
@@ -503,6 +503,11 @@ exit 0
 %endif
 
 %changelog
+* Fri Feb 14 2014 James Antill <james at fedoraproject.org> - 3.4.3-136
+- update to latest HEAD
+- Minor fixes/cleanups for yum fs diff.
+- Fix update-minimal traceback and ignoring updates. BZ 1048584.
+
 * Wed Feb 12 2014 James Antill <james at fedoraproject.org> - 3.4.3-135
 - update to latest HEAD
 - Add yum fs sub-command. filter/refilter/refilter-cleanup/du/status/diff.


More information about the scm-commits mailing list