[yum] update to latest HEAD.

James Antill james at fedoraproject.org
Thu Jan 31 21:37:17 UTC 2013


commit 0099b3ab1f9999071b769fa79473e707981c6fdd
Author: James Antill <james at and.org>
Date:   Thu Jan 31 16:37:08 2013 -0500

    update to latest HEAD.
    
    - Add pyxattr require for origin_urls for everyone.
    - Fix autoremove foo.
    - Speedup/fix repo-pkgs <foo> update with obsoletes.

 yum-HEAD.patch |  187 ++++++++++++++++++++++++++++++--------------------------
 yum.spec       |    8 ++-
 2 files changed, 108 insertions(+), 87 deletions(-)
---
diff --git a/yum-HEAD.patch b/yum-HEAD.patch
index 1465a46..af69c51 100644
--- a/yum-HEAD.patch
+++ b/yum-HEAD.patch
@@ -175804,10 +175804,10 @@ index 1ce4720..25e3022
      gobject.threads_init()
      dbus.glib.threads_init()
 diff --git a/yum.spec b/yum.spec
-index abd203f..02cbbd6 100644
+index abd203f..bad42d1 100644
 --- a/yum.spec
 +++ b/yum.spec
-@@ -1,24 +1,53 @@
+@@ -1,24 +1,55 @@
 -Summary: RPM installer/updater
 +%define move_yum_conf_back 1
 +%define auto_sitelib 1
@@ -175863,11 +175863,13 @@ index abd203f..02cbbd6 100644
  Requires: pygpgme
 +# rawhide is >= 0.5.3-7.fc18 ... as this is added.
 +Requires: pyliblzma
++# This is really a suggests, but we have none...
++Requires: pyxattr
 +
  Conflicts: rpm >= 5-0
  # Zif is a re-implementation of yum in C, however:
  #
-@@ -34,18 +63,28 @@ Conflicts: rpm >= 5-0
+@@ -34,18 +65,28 @@ Conflicts: rpm >= 5-0
  # zif experts).
  #
  # ...so we have two sane choices: i) Conflict with it. 2) Stop developing yum.
@@ -175903,7 +175905,7 @@ index abd203f..02cbbd6 100644
  
  %description
  Yum is a utility that can check for and automatically download and
-@@ -58,9 +97,11 @@ Group: Applications/System
+@@ -58,9 +99,11 @@ Group: Applications/System
  Requires: yum = %{version}-%{release}
  Requires: dbus-python
  Requires: pygobject2
@@ -175917,7 +175919,7 @@ index abd203f..02cbbd6 100644
  Requires(postun): /sbin/service
  
  
-@@ -72,29 +113,56 @@ can notify you when they are available via email, syslog or dbus.
+@@ -72,29 +115,56 @@ can notify you when they are available via email, syslog or dbus.
  %package cron
  Summary: Files needed to run yum updates as a cron job
  Group: System Environment/Base
@@ -175983,7 +175985,7 @@ index abd203f..02cbbd6 100644
  
  # Ghost files:
  mkdir -p $RPM_BUILD_ROOT/var/lib/yum/history
-@@ -102,12 +170,18 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/yum/plugins
+@@ -102,12 +172,18 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/yum/plugins
  mkdir -p $RPM_BUILD_ROOT/var/lib/yum/yumdb
  touch $RPM_BUILD_ROOT/var/lib/yum/uuid
  
@@ -176002,7 +176004,7 @@ index abd203f..02cbbd6 100644
  %post updatesd
  /sbin/chkconfig --add yum-updatesd
  /sbin/service yum-updatesd condrestart >/dev/null 2>&1
-@@ -119,67 +193,45 @@ if [ $1 = 0 ]; then
+@@ -119,67 +195,45 @@ if [ $1 = 0 ]; then
   /sbin/service yum-updatesd stop >/dev/null 2>&1
  fi
  exit 0
@@ -176088,7 +176090,7 @@ index abd203f..02cbbd6 100644
  %dir /var/cache/yum
  %dir /var/lib/yum
  %ghost /var/lib/yum/uuid
-@@ -188,20 +240,21 @@ exit 0
+@@ -188,20 +242,21 @@ exit 0
  %ghost /var/lib/yum/yumdb
  %{_mandir}/man*/yum.*
  %{_mandir}/man*/yum-shell*
@@ -176119,7 +176121,7 @@ index abd203f..02cbbd6 100644
  %files updatesd
  %defattr(-, root, root)
  %config(noreplace) %{_sysconfdir}/yum/yum-updatesd.conf
-@@ -210,8 +263,12 @@ exit 0
+@@ -210,8 +265,12 @@ exit 0
  %{_datadir}/yum-cli/yumupd.py*
  %{_sbindir}/yum-updatesd
  %{_mandir}/man*/yum-updatesd*
@@ -176160,7 +176162,7 @@ index c1af4ad..e3e3956 100644
      pass
      
 diff --git a/yum/__init__.py b/yum/__init__.py
-index 99039e0..0f0c2ae 100644
+index 99039e0..932e362 100644
 --- a/yum/__init__.py
 +++ b/yum/__init__.py
 @@ -21,6 +21,7 @@ The Yum RPM software updater.
@@ -178974,19 +178976,21 @@ index 99039e0..0f0c2ae 100644
                  if update_to:
                      availpkgs.extend(depmatches)
                  else:
-@@ -3818,10 +4848,10 @@ class YumBase(depsolve.Depsolve):
+@@ -3816,9 +4846,12 @@ class YumBase(depsolve.Depsolve):
+             try:
+                 if update_to:
                      m = []
++                elif kwargs.get('repoid'):
++                    pats = [kwargs['pattern']]
++                    m = self.pkgSack.sacks[kwargs['repoid']]
++                    m = m.returnNewestByNameArch(patterns=pats)
                  else:
                      pats = [kwargs['pattern']]
 -                    # pats += list(set([pkg.name for pkg in instpkgs]))
                      m = self.pkgSack.returnNewestByNameArch(patterns=pats)
              except Errors.PackageSackError:
                  m = []
-+            m = misc.filter_pkgs_repoid(m, kwargs.get('repoid'))
-             availpkgs.extend(m)
- 
-             if not availpkgs and not instpkgs:
-@@ -3843,7 +4873,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3843,7 +4876,7 @@ class YumBase(depsolve.Depsolve):
                      availpkgs = self._compare_providers(availpkgs, requiringPo)
                      availpkgs = map(lambda x: x[0], availpkgs)
                  elif not availpkgs:
@@ -178995,7 +178999,7 @@ index 99039e0..0f0c2ae 100644
         
          # for any thing specified
          # get the list of available pkgs matching it (or take the po)
-@@ -3879,6 +4909,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3879,6 +4912,7 @@ class YumBase(depsolve.Depsolve):
                      if obsoleting_pkg is None:
                          continue
                      obs_pkgs.append(obsoleting_pkg)
@@ -179003,7 +179007,7 @@ index 99039e0..0f0c2ae 100644
                  for obsoleting_pkg in packagesNewestByName(obs_pkgs):
                      tx_return.extend(self.install(po=obsoleting_pkg))
              for available_pkg in availpkgs:
-@@ -3920,6 +4951,21 @@ class YumBase(depsolve.Depsolve):
+@@ -3920,11 +4954,29 @@ class YumBase(depsolve.Depsolve):
                      tx_return.append(txmbr)
                          
          for available_pkg in availpkgs:
@@ -179025,7 +179029,15 @@ index 99039e0..0f0c2ae 100644
              #  Make sure we're not installing a package which is obsoleted by
              # something else in the repo. Unless there is a obsoletion loop,
              # at which point ignore everything.
-@@ -3985,11 +5031,18 @@ class YumBase(depsolve.Depsolve):
+             obsoleting_pkg = self._test_loop(available_pkg, self._pkg2obspkg)
+             if obsoleting_pkg is not None:
++                if (kwargs.get('repoid') and
++                    obsoleting_pkg.repoid != kwargs.get('repoid')):
++                    continue # Meh.
+                 self.verbose_logger.log(logginglevels.DEBUG_2, _('Not Updating Package that is obsoleted: %s'), available_pkg)
+                 tx_return.extend(self.update(po=obsoleting_pkg))
+                 continue
+@@ -3985,11 +5037,18 @@ class YumBase(depsolve.Depsolve):
          return tx_return
          
      def remove(self, po=None, **kwargs):
@@ -179049,7 +179061,7 @@ index 99039e0..0f0c2ae 100644
          if not po and not kwargs:
              raise Errors.RemoveError, 'Nothing specified to remove'
          
-@@ -4008,6 +5061,10 @@ class YumBase(depsolve.Depsolve):
+@@ -4008,6 +5067,10 @@ class YumBase(depsolve.Depsolve):
                      return self._at_groupremove(kwargs['pattern'])
  
                  (e,m,u) = self.rpmdb.matchPackageNames([kwargs['pattern']])
@@ -179060,7 +179072,7 @@ index 99039e0..0f0c2ae 100644
                  pkgs.extend(e)
                  pkgs.extend(m)
                  if u:
-@@ -4018,6 +5075,10 @@ class YumBase(depsolve.Depsolve):
+@@ -4018,6 +5081,10 @@ class YumBase(depsolve.Depsolve):
                      except yum.Errors.YumBaseError, e:
                          self.logger.critical(_('%s') % e)
                      
@@ -179071,7 +179083,7 @@ index 99039e0..0f0c2ae 100644
                      if not depmatches:
                          arg = to_unicode(arg)
                          self.logger.critical(_('No Match for argument: %s') % to_unicode(arg))
-@@ -4055,17 +5116,19 @@ class YumBase(depsolve.Depsolve):
+@@ -4055,17 +5122,19 @@ class YumBase(depsolve.Depsolve):
          return tx_return
  
      def installLocal(self, pkg, po=None, updateonly=False):
@@ -179101,7 +179113,7 @@ index 99039e0..0f0c2ae 100644
          # read in the package into a YumLocalPackage Object
          # append it to self.localPackages
          # check if it can be installed or updated based on nevra versus rpmdb
-@@ -4183,16 +5246,15 @@ class YumBase(depsolve.Depsolve):
+@@ -4183,16 +5252,15 @@ class YumBase(depsolve.Depsolve):
          return tx_return
  
      def reinstallLocal(self, pkg, po=None):
@@ -179126,7 +179138,7 @@ index 99039e0..0f0c2ae 100644
          if not po:
              try:
                  po = YumUrlPackage(self, ts=self.rpmdb.readOnlyTS(), url=pkg,
-@@ -4215,9 +5277,19 @@ class YumBase(depsolve.Depsolve):
+@@ -4215,9 +5283,19 @@ class YumBase(depsolve.Depsolve):
          return self.reinstall(po=po)
  
      def reinstall(self, po=None, **kwargs):
@@ -179149,7 +179161,7 @@ index 99039e0..0f0c2ae 100644
          self._add_prob_flags(rpm.RPMPROB_FILTER_REPLACEPKG,
                               rpm.RPMPROB_FILTER_REPLACENEWFILES,
                               rpm.RPMPROB_FILTER_REPLACEOLDFILES)
-@@ -4259,16 +5331,15 @@ class YumBase(depsolve.Depsolve):
+@@ -4259,16 +5337,15 @@ class YumBase(depsolve.Depsolve):
          return tx_mbrs
          
      def downgradeLocal(self, pkg, po=None):
@@ -179174,7 +179186,7 @@ index 99039e0..0f0c2ae 100644
          if not po:
              try:
                  po = YumUrlPackage(self, ts=self.rpmdb.readOnlyTS(), url=pkg,
-@@ -4309,13 +5380,19 @@ class YumBase(depsolve.Depsolve):
+@@ -4309,13 +5386,19 @@ class YumBase(depsolve.Depsolve):
          return False
          
      def downgrade(self, po=None, **kwargs):
@@ -179201,7 +179213,7 @@ index 99039e0..0f0c2ae 100644
          if not po and not kwargs:
              raise Errors.DowngradeError, 'Nothing specified to downgrade'
  
-@@ -4397,6 +5474,10 @@ class YumBase(depsolve.Depsolve):
+@@ -4397,6 +5480,10 @@ class YumBase(depsolve.Depsolve):
          # installed version. Indexed fromn the latest installed pkgtup.
          downgrade_apkgs = {}
          for pkg in sorted(apkgs):
@@ -179212,7 +179224,7 @@ index 99039e0..0f0c2ae 100644
              na  = (pkg.name, pkg.arch)
  
              # Here we allow downgrades from .i386 => .noarch, or .i586 => .i386
-@@ -4421,6 +5502,9 @@ class YumBase(depsolve.Depsolve):
+@@ -4421,6 +5508,9 @@ class YumBase(depsolve.Depsolve):
                  warned_nas.add(na)
                  continue
  
@@ -179222,7 +179234,7 @@ index 99039e0..0f0c2ae 100644
              if pkg.verGE(lipkg):
                  if na not in warned_nas:
                      msg = _('Only Upgrade available on package: %s') % pkg
-@@ -4457,7 +5541,7 @@ class YumBase(depsolve.Depsolve):
+@@ -4457,7 +5547,7 @@ class YumBase(depsolve.Depsolve):
          if e and v and r:
              evr = '%s:%s-%s' % (e, v, r)
          elif v and r:
@@ -179231,7 +179243,7 @@ index 99039e0..0f0c2ae 100644
          elif e and v:
              evr = '%s:%s' % (e, v)
          elif v: # e and r etc. is just too weird to print
-@@ -4500,12 +5584,24 @@ class YumBase(depsolve.Depsolve):
+@@ -4500,12 +5590,24 @@ class YumBase(depsolve.Depsolve):
  
          return returndict
  
@@ -179259,7 +179271,7 @@ index 99039e0..0f0c2ae 100644
          old_conf_obs = self.conf.obsoletes
          self.conf.obsoletes = False
          done = False
-@@ -4515,19 +5611,46 @@ class YumBase(depsolve.Depsolve):
+@@ -4515,19 +5617,46 @@ class YumBase(depsolve.Depsolve):
                      done = True
          for pkg in transaction.trans_data:
              if pkg.state == 'Downgrade':
@@ -179306,7 +179318,7 @@ index 99039e0..0f0c2ae 100644
                  if self.install(pkgtup=pkg.pkgtup):
                      done = True
          for pkg in transaction.trans_data:
-@@ -4538,8 +5661,14 @@ class YumBase(depsolve.Depsolve):
+@@ -4538,8 +5667,14 @@ class YumBase(depsolve.Depsolve):
          return done
  
      def history_undo(self, transaction):
@@ -179323,7 +179335,7 @@ index 99039e0..0f0c2ae 100644
          # NOTE: This is somewhat basic atm. ... for instance we don't check
          #       that we are going from the old new version. However it's still
          #       better than the RHN rollback code, and people pay for that :).
-@@ -4616,7 +5745,7 @@ class YumBase(depsolve.Depsolve):
+@@ -4616,7 +5751,7 @@ class YumBase(depsolve.Depsolve):
  
          except urlgrabber.grabber.URLGrabError, e:
              raise Errors.YumBaseError(_('GPG key retrieval failed: ') +
@@ -179332,7 +179344,7 @@ index 99039e0..0f0c2ae 100644
                                        
          # check for a .asc file accompanying it - that's our gpg sig on the key
          # suck it down and do the check
-@@ -4649,7 +5778,7 @@ class YumBase(depsolve.Depsolve):
+@@ -4649,7 +5784,7 @@ class YumBase(depsolve.Depsolve):
              keys_info = misc.getgpgkeyinfo(rawkey, multiple=True)
          except ValueError, e:
              raise Errors.YumBaseError(_('Invalid GPG Key from %s: %s') % 
@@ -179341,7 +179353,7 @@ index 99039e0..0f0c2ae 100644
          keys = []
          for keyinfo in keys_info:
              thiskey = {}
-@@ -4674,39 +5803,49 @@ class YumBase(depsolve.Depsolve):
+@@ -4674,39 +5809,49 @@ class YumBase(depsolve.Depsolve):
              if pkgs:
                  pkgs = sorted(pkgs)[-1]
                  msg = (_('Importing %s key 0x%s:\n'
@@ -179409,7 +179421,7 @@ index 99039e0..0f0c2ae 100644
          user_cb_fail = False
          for keyurl in keyurls:
              keys = self._retrievePublicKey(keyurl, repo)
-@@ -4725,7 +5864,9 @@ class YumBase(depsolve.Depsolve):
+@@ -4725,7 +5870,9 @@ class YumBase(depsolve.Depsolve):
                      # Try installing/updating GPG key
                      self._getKeyImportMessage(info, keyurl)
                      rc = False
@@ -179420,7 +179432,7 @@ index 99039e0..0f0c2ae 100644
                          rc = True
                          
                      # grab the .sig/.asc for the keyurl, if it exists
-@@ -4751,8 +5892,8 @@ class YumBase(depsolve.Depsolve):
+@@ -4751,8 +5898,8 @@ class YumBase(depsolve.Depsolve):
                  ts = self.rpmdb.readOnlyTS()
                  result = ts.pgpImportPubkey(misc.procgpgkey(info['raw_key']))
                  if result != 0:
@@ -179431,7 +179443,7 @@ index 99039e0..0f0c2ae 100644
                  self.logger.info(_('Key imported successfully'))
                  key_installed = True
  
-@@ -4760,18 +5901,20 @@ class YumBase(depsolve.Depsolve):
+@@ -4760,18 +5907,20 @@ class YumBase(depsolve.Depsolve):
              raise Errors.YumBaseError, _("Didn't install any keys")
  
          if not key_installed:
@@ -179457,7 +179469,7 @@ index 99039e0..0f0c2ae 100644
      
      def _getAnyKeyForRepo(self, repo, destdir, keyurl_list, is_cakey=False, callback=None):
          """
-@@ -4788,6 +5931,18 @@ class YumBase(depsolve.Depsolve):
+@@ -4788,6 +5937,18 @@ class YumBase(depsolve.Depsolve):
          """
  
          key_installed = False
@@ -179476,7 +179488,7 @@ index 99039e0..0f0c2ae 100644
          user_cb_fail = False
          for keyurl in keyurl_list:
              keys = self._retrievePublicKey(keyurl, repo, getSig=not is_cakey)
-@@ -4819,8 +5974,11 @@ class YumBase(depsolve.Depsolve):
+@@ -4819,8 +5980,11 @@ class YumBase(depsolve.Depsolve):
                  if not key_installed:
                      self._getKeyImportMessage(info, keyurl, keytype)
                      rc = False
@@ -179489,7 +179501,7 @@ index 99039e0..0f0c2ae 100644
                      elif callback:
                          rc = callback({"repo": repo, "userid": info['userid'],
                                          "hexkeyid": info['hexkeyid'], "keyurl": keyurl,
-@@ -4835,7 +5993,8 @@ class YumBase(depsolve.Depsolve):
+@@ -4835,7 +5999,8 @@ class YumBase(depsolve.Depsolve):
                  # Import the key
                  result = misc.import_key_to_pubring(info['raw_key'], info['hexkeyid'], gpgdir=destdir)
                  if not result:
@@ -179499,7 +179511,7 @@ index 99039e0..0f0c2ae 100644
                  self.logger.info(_('Key imported successfully'))
                  key_installed = True
                  # write out the key id to imported_cakeys in the repos basedir
-@@ -4851,36 +6010,35 @@ class YumBase(depsolve.Depsolve):
+@@ -4851,36 +6016,35 @@ class YumBase(depsolve.Depsolve):
                              pass
  
          if not key_installed and user_cb_fail:
@@ -179552,7 +179564,7 @@ index 99039e0..0f0c2ae 100644
          self._getAnyKeyForRepo(repo, repo.gpgcadir, repo.gpgcakey, is_cakey=True, callback=callback)
  
      def _limit_installonly_pkgs(self):
-@@ -4889,7 +6047,7 @@ class YumBase(depsolve.Depsolve):
+@@ -4889,7 +6053,7 @@ class YumBase(depsolve.Depsolve):
              New in 3.2.24: Obey yumdb_info.installonly data. """
  
          def _sort_and_filter_installonly(pkgs):
@@ -179561,7 +179573,7 @@ index 99039e0..0f0c2ae 100644
                  using the yumdb. """
              ret_beg = []
              ret_mid = []
-@@ -4926,23 +6084,30 @@ class YumBase(depsolve.Depsolve):
+@@ -4926,23 +6090,30 @@ class YumBase(depsolve.Depsolve):
          # so self.rpmdb.ts should be valid.
          ts = self.rpmdb.readOnlyTS()
          (cur_kernel_v, cur_kernel_r) = misc.get_running_kernel_version_release(ts)
@@ -179600,7 +179612,7 @@ index 99039e0..0f0c2ae 100644
              for po in installed:
                  if (po.version, po.release) == (cur_kernel_v, cur_kernel_r): 
                      # don't remove running
-@@ -4959,19 +6124,22 @@ class YumBase(depsolve.Depsolve):
+@@ -4959,19 +6130,22 @@ class YumBase(depsolve.Depsolve):
              txmbr.depends_on.append(rel)
  
      def processTransaction(self, callback=None,rpmTestDisplay=None, rpmDisplay=None):
@@ -179636,7 +179648,7 @@ index 99039e0..0f0c2ae 100644
          
          if not callback:
              callback = callbacks.ProcessTransNoOutputCallback()
-@@ -5114,13 +6282,19 @@ class YumBase(depsolve.Depsolve):
+@@ -5114,13 +6288,19 @@ class YumBase(depsolve.Depsolve):
          return results
  
      def add_enable_repo(self, repoid, baseurls=[], mirrorlist=None, **kwargs):
@@ -179663,7 +179675,7 @@ index 99039e0..0f0c2ae 100644
          # out of place fixme - maybe we should make this the default repo addition
          # routine and use it from getReposFromConfigFile(), etc.
          newrepo = yumRepo.YumRepository(repoid)
-@@ -5167,9 +6341,15 @@ class YumBase(depsolve.Depsolve):
+@@ -5167,9 +6347,15 @@ class YumBase(depsolve.Depsolve):
  
      def setCacheDir(self, force=False, tmpdir=None, reuse=True,
                      suffix='/$basearch/$releasever'):
@@ -179682,7 +179694,7 @@ index 99039e0..0f0c2ae 100644
          if not force and os.geteuid() == 0:
              return True # We are root, not forced, so happy with the global dir.
          if tmpdir is None:
-@@ -5179,7 +6359,7 @@ class YumBase(depsolve.Depsolve):
+@@ -5179,7 +6365,7 @@ class YumBase(depsolve.Depsolve):
          try:
              cachedir = misc.getCacheDir(tmpdir, reuse)
          except (IOError, OSError), e:
@@ -179691,7 +179703,7 @@ index 99039e0..0f0c2ae 100644
              cachedir = None
              
          if cachedir is None:
-@@ -5190,6 +6370,7 @@ class YumBase(depsolve.Depsolve):
+@@ -5190,6 +6376,7 @@ class YumBase(depsolve.Depsolve):
              self.prerepoconf.cachedir = cachedir
          else:
              self.repos.setCacheDir(cachedir)
@@ -179699,7 +179711,7 @@ index 99039e0..0f0c2ae 100644
          self.conf.cachedir = cachedir
          return True # We got a new cache dir
  
-@@ -5220,13 +6401,24 @@ class YumBase(depsolve.Depsolve):
+@@ -5220,13 +6407,24 @@ class YumBase(depsolve.Depsolve):
          self.history.write_addon_data('config-repos', myrepos)
          
      def verify_plugins_cb(self, verify_package):
@@ -179727,7 +179739,7 @@ index 99039e0..0f0c2ae 100644
          if self.tsInfo._unresolvedMembers:
              if auto:
                  self.logger.critical(_("Dependencies not solved. Will not save unresolved transaction."))
-@@ -5234,7 +6426,7 @@ class YumBase(depsolve.Depsolve):
+@@ -5234,7 +6432,7 @@ class YumBase(depsolve.Depsolve):
              raise Errors.YumBaseError(_("Dependencies not solved. Will not save unresolved transaction."))
          
          if not filename:
@@ -179736,7 +179748,7 @@ index 99039e0..0f0c2ae 100644
              fd,filename = tempfile.mkstemp(suffix='.yumtx', prefix=prefix)
              f = os.fdopen(fd, 'w')
          else:
-@@ -5244,13 +6436,17 @@ class YumBase(depsolve.Depsolve):
+@@ -5244,13 +6442,17 @@ class YumBase(depsolve.Depsolve):
          
          msg = "%s\n" % self.rpmdb.simpleVersion(main_only=True)[0]
          msg += "%s\n" % self.ts.getTsFlags()
@@ -179757,7 +179769,7 @@ index 99039e0..0f0c2ae 100644
          msg += "%s\n" % len(self.tsInfo.getMembers())
          for txmbr in self.tsInfo.getMembers():
              msg += txmbr._dump()
-@@ -5260,13 +6456,25 @@ class YumBase(depsolve.Depsolve):
+@@ -5260,13 +6462,25 @@ class YumBase(depsolve.Depsolve):
          except (IOError, OSError), e:
              self._ts_save_file = None
              if auto:
@@ -179789,7 +179801,7 @@ index 99039e0..0f0c2ae 100644
          # check rpmversion - if not match throw a fit
          # check repoversions  (and repos)- if not match throw a fit
          # load each txmbr - if pkgs being updated don't exist, bail w/error
-@@ -5276,26 +6484,45 @@ class YumBase(depsolve.Depsolve):
+@@ -5276,26 +6490,45 @@ class YumBase(depsolve.Depsolve):
          try:
              data = open(filename, 'r').readlines()
          except (IOError, OSError), e:
@@ -179837,7 +179849,7 @@ index 99039e0..0f0c2ae 100644
              if ignorerpm:
                  msg += _(" ignoring, as requested.")
                  self.logger.critical(_(msg))
-@@ -5318,8 +6545,17 @@ class YumBase(depsolve.Depsolve):
+@@ -5318,8 +6551,17 @@ class YumBase(depsolve.Depsolve):
          numrepos = int(data[2].strip())
          repos = []
          rindex=3+numrepos
@@ -179856,7 +179868,7 @@ index 99039e0..0f0c2ae 100644
  
          # pkgs/txmbrs
          numpkgs = int(data[rindex].strip())
-@@ -5329,6 +6565,7 @@ class YumBase(depsolve.Depsolve):
+@@ -5329,6 +6571,7 @@ class YumBase(depsolve.Depsolve):
          pkgcount = 0
          pkgprob = False
          curpkg = None
@@ -179864,7 +179876,7 @@ index 99039e0..0f0c2ae 100644
          for l in data[pkgstart:]:
              l = l.rstrip()
              # our main txmbrs
-@@ -5356,6 +6593,7 @@ class YumBase(depsolve.Depsolve):
+@@ -5356,6 +6599,7 @@ class YumBase(depsolve.Depsolve):
                      if not ignoremissing:
                          raise Errors.YumBaseError(msg)
                      else:
@@ -179872,7 +179884,7 @@ index 99039e0..0f0c2ae 100644
                          self.logger.critical(msg)
                  else:
                      pkgcount += 1
-@@ -5432,12 +6670,18 @@ class YumBase(depsolve.Depsolve):
+@@ -5432,12 +6676,18 @@ class YumBase(depsolve.Depsolve):
          if pkgprob:
              msg = _("Transaction members, relations are missing or ts has been modified,")
              if ignoremissing:
@@ -179891,7 +179903,7 @@ index 99039e0..0f0c2ae 100644
          return self.tsInfo.getMembers()
  
      def _remove_old_deps(self):
-@@ -5470,18 +6714,6 @@ class YumBase(depsolve.Depsolve):
+@@ -5470,18 +6720,6 @@ class YumBase(depsolve.Depsolve):
                      if requiring == required: # if they are self-requiring skip them
                          continue
                          
@@ -179910,7 +179922,7 @@ index 99039e0..0f0c2ae 100644
                      #for tbi_pkg in self.tsInfo.getMembersWithState(output_states=TS_INSTALL_STATES):
                      #   for reqtuple in tbi_pkg.po.requires:
                      #        if required.provides_for(reqtuple):
-@@ -5533,7 +6765,24 @@ class YumBase(depsolve.Depsolve):
+@@ -5533,7 +6771,24 @@ class YumBase(depsolve.Depsolve):
                      # Debugging output
                      self.verbose_logger.log(logginglevels.DEBUG_2, _("%s has revdep %s which was user-installed."), pkg, curpkg)
                      ok_to_remove[pkg] = False
@@ -179935,7 +179947,7 @@ index 99039e0..0f0c2ae 100644
                  visited[curpkg] = True
              all_leaves_visited = True
              leaves = curpkg.requiring_packages()
-@@ -5547,4 +6796,3 @@ class YumBase(depsolve.Depsolve):
+@@ -5547,4 +6802,3 @@ class YumBase(depsolve.Depsolve):
          # Debugging output
          self.verbose_logger.log(logginglevels.DEBUG_2, _("%s has no user-installed revdeps."), pkg)
          return False
@@ -186185,7 +186197,7 @@ index e5e9ece..dfcf8f9 100644
          fo = None
  
 diff --git a/yumcommands.py b/yumcommands.py
-index 4dcbea7..25165b7 100644
+index 4dcbea7..24d04e3 100644
 --- a/yumcommands.py
 +++ b/yumcommands.py
 @@ -22,14 +22,14 @@ Classes for subcommands of the yum command line interface.
@@ -186803,7 +186815,7 @@ index 4dcbea7..25165b7 100644
              else:
                  rop = base.listPkgs(ypl.obsoletes, _('Obsoleting Packages'),
                                      basecmd, columns=columns)
-@@ -389,45 +716,160 @@ class InfoCommand(YumCommand):
+@@ -389,45 +716,163 @@ class InfoCommand(YumCommand):
              return 0, []
  
      def needTs(self, base, basecmd, extcmds):
@@ -186872,6 +186884,7 @@ index 4dcbea7..25165b7 100644
 +        """
 +        return ['erase', 'remove', 'autoremove',
 +                'erase-n', 'erase-na', 'erase-nevra',
++                'autoremove-n', 'autoremove-na', 'autoremove-nevra',
 +                'remove-n', 'remove-na', 'remove-nevra']
  
      def getUsage(self):
@@ -186919,11 +186932,13 @@ index 4dcbea7..25165b7 100644
 +        """
 +
 +        pos = False
-+        if basecmd == 'autoremove':
++        if basecmd.startswith('autoremove'):
 +            #  We have to alter this, as it's used in resolving stage. Which
 +            # sucks. Just be careful in "yum shell".
 +            base.conf.clean_requirements_on_remove = True
 +
++            basecmd = basecmd[len('auto'):] # pretend it's just remove...
++
 +            if not extcmds:
 +                pos = True
 +                extcmds = []
@@ -186967,7 +186982,7 @@ index 4dcbea7..25165b7 100644
          return True
  
   
-@@ -442,12 +884,25 @@ class GroupsCommand(YumCommand):
+@@ -442,12 +887,25 @@ class GroupsCommand(YumCommand):
                         'groupinfo'    : 'info'}
  
      def getNames(self):
@@ -186993,7 +187008,7 @@ index 4dcbea7..25165b7 100644
          return _("Display, or use, the groups information")
      
      def _grp_setup_doCommand(self, base):
-@@ -459,7 +914,7 @@ class GroupsCommand(YumCommand):
+@@ -459,7 +917,7 @@ class GroupsCommand(YumCommand):
          except yum.Errors.GroupsError:
              return 1, [_('No Groups on which to run command')]
          except yum.Errors.YumBaseError, e:
@@ -187002,7 +187017,7 @@ index 4dcbea7..25165b7 100644
  
      def _grp_cmd(self, basecmd, extcmds):
          if basecmd in self.direct_commands:
-@@ -470,6 +925,10 @@ class GroupsCommand(YumCommand):
+@@ -470,6 +928,10 @@ class GroupsCommand(YumCommand):
          else:
              cmd = 'summary'
  
@@ -187013,7 +187028,7 @@ index 4dcbea7..25165b7 100644
          remap = {'update' : 'upgrade',
                   'erase' : 'remove',
                   'mark-erase' : 'mark-remove',
-@@ -479,32 +938,76 @@ class GroupsCommand(YumCommand):
+@@ -479,32 +941,76 @@ class GroupsCommand(YumCommand):
          return cmd, extcmds
  
      def doCheck(self, base, basecmd, extcmds):
@@ -187100,7 +187115,7 @@ index 4dcbea7..25165b7 100644
          cmd, extcmds = self._grp_cmd(basecmd, extcmds)
  
          self._grp_setup_doCommand(base)
-@@ -524,39 +1027,258 @@ class GroupsCommand(YumCommand):
+@@ -524,39 +1030,258 @@ class GroupsCommand(YumCommand):
              if cmd == 'remove':
                  return base.removeGroups(extcmds)
  
@@ -187361,7 +187376,7 @@ index 4dcbea7..25165b7 100644
          base.logger.debug(_("Making cache files for all metadata files."))
          base.logger.debug(_("This may take a while depending on the speed of this computer"))
          try:
-@@ -565,81 +1287,227 @@ class MakeCacheCommand(YumCommand):
+@@ -565,81 +1290,227 @@ class MakeCacheCommand(YumCommand):
                  repo.mdpolicy = "group:all"
              base.doRepoSetup(dosack=0)
              base.repos.doSetup()
@@ -187596,7 +187611,7 @@ index 4dcbea7..25165b7 100644
          obscmds = ['obsoletes'] + extcmds
          base.extcmds.insert(0, 'updates')
          result = 0
-@@ -676,161 +1544,480 @@ class CheckUpdateCommand(YumCommand):
+@@ -676,161 +1547,480 @@ class CheckUpdateCommand(YumCommand):
                                                columns=columns)
                  result = 100
          except yum.Errors.YumBaseError, e:
@@ -188086,7 +188101,7 @@ index 4dcbea7..25165b7 100644
          def _repo_size(repo):
              ret = 0
              for pkg in repo.sack.returnPackages():
-@@ -857,7 +2044,10 @@ class RepoListCommand(YumCommand):
+@@ -857,7 +2047,10 @@ class RepoListCommand(YumCommand):
              arg = 'enabled'
          extcmds = map(lambda x: x.lower(), extcmds)
  
@@ -188098,7 +188113,7 @@ index 4dcbea7..25165b7 100644
          if arg != 'disabled' or extcmds:
              try:
                  # Setup so len(repo.sack) is correct
-@@ -866,6 +2056,13 @@ class RepoListCommand(YumCommand):
+@@ -866,6 +2059,13 @@ class RepoListCommand(YumCommand):
              except yum.Errors.RepoError:
                  if verbose:
                      raise
@@ -188112,7 +188127,7 @@ index 4dcbea7..25165b7 100644
  
          repos = base.repos.repos.values()
          repos.sort()
-@@ -924,111 +2121,108 @@ class RepoListCommand(YumCommand):
+@@ -924,111 +2124,108 @@ class RepoListCommand(YumCommand):
                  ui_enabled = dhibeg + _('disabled') + hiend
                  ui_endis_wid = utf8_width(_('disabled'))
  
@@ -188317,7 +188332,7 @@ index 4dcbea7..25165b7 100644
  
          if not verbose and cols:
              #  Work out the first (id) and last (enabled/disalbed/count),
-@@ -1088,21 +2282,64 @@ class RepoListCommand(YumCommand):
+@@ -1088,21 +2285,64 @@ class RepoListCommand(YumCommand):
          return 0, ['repolist: ' +to_unicode(locale.format("%d", tot_num, True))]
  
      def needTs(self, base, basecmd, extcmds):
@@ -188382,7 +188397,7 @@ index 4dcbea7..25165b7 100644
          if len(extcmds) == 0:
              base.usage()
              raise cli.CliError
-@@ -1147,28 +2384,85 @@ class HelpCommand(YumCommand):
+@@ -1147,28 +2387,85 @@ class HelpCommand(YumCommand):
          return help_output
  
      def doCommand(self, base, basecmd, extcmds):
@@ -188468,7 +188483,7 @@ index 4dcbea7..25165b7 100644
          self.doneCommand(base, _("Setting up Reinstall Process"))
          try:
              return base.reinstallPkgs(extcmds)
-@@ -1177,49 +2471,139 @@ class ReInstallCommand(YumCommand):
+@@ -1177,49 +2474,139 @@ class ReInstallCommand(YumCommand):
              return 1, [to_unicode(e)]
  
      def getSummary(self):
@@ -188609,7 +188624,7 @@ index 4dcbea7..25165b7 100644
          vcmd = 'installed'
          if extcmds:
              vcmd = extcmds[0]
-@@ -1308,7 +2692,7 @@ class VersionCommand(YumCommand):
+@@ -1308,7 +2695,7 @@ class VersionCommand(YumCommand):
                                       str(data[2][grp])))
                          _append_repos(cols, data[3][grp])
              except yum.Errors.YumBaseError, e:
@@ -188618,7 +188633,7 @@ index 4dcbea7..25165b7 100644
          if vcmd in ('available', 'all', 'group-available', 'group-all'):
              try:
                  data = base.pkgSack.simpleVersion(not verbose, groups=groups)
-@@ -1327,7 +2711,7 @@ class VersionCommand(YumCommand):
+@@ -1327,7 +2714,7 @@ class VersionCommand(YumCommand):
                          if verbose:
                              _append_repos(cols, data[3][grp])
              except yum.Errors.YumBaseError, e:
@@ -188627,7 +188642,7 @@ index 4dcbea7..25165b7 100644
  
          data = {'rid' : {}, 'ver' : {}}
          for (rid, ver) in cols:
-@@ -1344,6 +2728,14 @@ class VersionCommand(YumCommand):
+@@ -1344,6 +2731,14 @@ class VersionCommand(YumCommand):
          return 0, ['version']
  
      def needTs(self, base, basecmd, extcmds):
@@ -188642,7 +188657,7 @@ index 4dcbea7..25165b7 100644
          vcmd = 'installed'
          if extcmds:
              vcmd = extcmds[0]
-@@ -1352,25 +2744,74 @@ class VersionCommand(YumCommand):
+@@ -1352,25 +2747,74 @@ class VersionCommand(YumCommand):
              return True
          return vcmd in ('available', 'all', 'group-available', 'group-all')
  
@@ -188718,7 +188733,7 @@ index 4dcbea7..25165b7 100644
              return 2, ["Repeating transaction %u" % (old.tid,)]
  
      def _hcmd_undo(self, base, extcmds):
-@@ -1426,12 +2867,57 @@ class HistoryCommand(YumCommand):
+@@ -1426,12 +2870,57 @@ class HistoryCommand(YumCommand):
      def _hcmd_new(self, base, extcmds):
          base.history._create_db_file()
  
@@ -188777,7 +188792,7 @@ index 4dcbea7..25165b7 100644
          if extcmds and extcmds[0] not in cmds:
              base.logger.critical(_('Invalid history sub-command, use: %s.'),
                                   ", ".join(cmds))
-@@ -1444,6 +2930,19 @@ class HistoryCommand(YumCommand):
+@@ -1444,6 +2933,19 @@ class HistoryCommand(YumCommand):
              raise cli.CliError
  
      def doCommand(self, base, basecmd, extcmds):
@@ -188797,7 +188812,7 @@ index 4dcbea7..25165b7 100644
          vcmd = 'list'
          if extcmds:
              vcmd = extcmds[0]
-@@ -1468,29 +2967,88 @@ class HistoryCommand(YumCommand):
+@@ -1468,29 +2970,88 @@ class HistoryCommand(YumCommand):
              ret = self._hcmd_rollback(base, extcmds)
          elif vcmd == 'new':
              ret = self._hcmd_new(base, extcmds)
@@ -188886,7 +188901,7 @@ index 4dcbea7..25165b7 100644
          chkcmd = 'all'
          if extcmds:
              chkcmd = extcmds
-@@ -1505,19 +3063,58 @@ class CheckRpmdbCommand(YumCommand):
+@@ -1505,19 +3066,58 @@ class CheckRpmdbCommand(YumCommand):
          return rc, ['%s %s' % (basecmd, chkcmd)]
  
      def needTs(self, base, basecmd, extcmds):
@@ -188945,7 +188960,7 @@ index 4dcbea7..25165b7 100644
          if not extcmds:
              base.logger.critical(_("No saved transaction file specified."))
              raise cli.CliError
-@@ -1533,5 +3130,322 @@ class LoadTransactionCommand(YumCommand):
+@@ -1533,5 +3133,322 @@ class LoadTransactionCommand(YumCommand):
  
  
      def needTs(self, base, basecmd, extcmds):
diff --git a/yum.spec b/yum.spec
index abc1014..3353c38 100644
--- a/yum.spec
+++ b/yum.spec
@@ -18,7 +18,7 @@
 Summary: RPM package installer/updater/manager
 Name: yum
 Version: 3.4.3
-Release: 56%{?dist}
+Release: 57%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz
@@ -284,6 +284,12 @@ exit 0
 %endif
 
 %changelog
+* Thu Jan 31 2013 James Antill <james at fedoraproject.org> - 3.4.3-57
+- update to latest HEAD.
+- Add pyxattr require for origin_urls for everyone.
+- Fix autoremove foo.
+- Speedup/fix repo-pkgs <foo> update with obsoletes.
+
 * Wed Jan 30 2013 James Antill <james at fedoraproject.org> - 3.4.3-56
 - update to latest HEAD.
 - Add yumvar dumping into yumdb.


More information about the scm-commits mailing list