[yum] Latest head

James Antill james at fedoraproject.org
Thu Nov 11 22:20:42 UTC 2010


commit 57b43e12480b1d5b4f2fab87ed9fd449e52af255
Author: James Antill <james at and.org>
Date:   Thu Nov 11 17:20:32 2010 -0500

    Latest head

 yum-HEAD.patch |  257 +++++++++++++++++++++++++++++++++++++++++---------------
 yum.spec       |    6 +-
 2 files changed, 194 insertions(+), 69 deletions(-)
---
diff --git a/yum-HEAD.patch b/yum-HEAD.patch
index 303eb81..26569a4 100644
--- a/yum-HEAD.patch
+++ b/yum-HEAD.patch
@@ -12,7 +12,7 @@ index 8065899..20f5629 100644
  
  test-skipbroken:
 diff --git a/cli.py b/cli.py
-index 9542b7a..b84183b 100644
+index 9542b7a..0c5d8ed 100644
 --- a/cli.py
 +++ b/cli.py
 @@ -101,6 +101,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
@@ -33,7 +33,35 @@ index 9542b7a..b84183b 100644
          commands.sort(key=lambda x: x.getNames()[0])
          for command in commands:
              # XXX Remove this when getSummary is common in plugins
-@@ -327,14 +329,34 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -228,6 +230,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+             # now set  all the non-first-start opts from main from our setopts
+             if self.main_setopts:
+                 for opt in self.main_setopts.items:
++                    if not hasattr(self.conf, opt):
++                        msg ="Main config did not have a %s attr. before setopt"
++                        self.logger.warning(msg % opt)
+                     setattr(self.conf, opt, getattr(self.main_setopts, opt))
+ 
+         except yum.Errors.ConfigError, e:
+@@ -245,6 +250,17 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+         # apply some of the options to self.conf
+         (opts, self.cmds) = self.optparser.setupYumConfig(args=args)
+ 
++        #  Check that firstParse didn't miss anything, and warn the user if it
++        # did ... because this is really magic, and unexpected.
++        if opts.quiet:
++            opts.debuglevel = 0
++        if opts.verbose:
++            opts.debuglevel = opts.errorlevel = 6
++        if opts.debuglevel != pc.debuglevel or opts.errorlevel != pc.errorlevel:
++            self.logger.warning("Ignored option -q, -v, -d or -e (probably due to merging: -yq != -y -q)")
++        if opts.conffile != pc.fn:
++            self.logger.warning("Ignored option -c (probably due to merging -yc != -y -c)")
++
+         if opts.version:
+             self.conf.cache = 1
+             yum_progs = self.run_with_package_names
+@@ -327,14 +343,34 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
      
          self.yum_cli_commands[self.basecmd].doCheck(self, self.basecmd, self.extcmds)
  
@@ -68,7 +96,7 @@ index 9542b7a..b84183b 100644
          return yumshell.result, yumshell.resultmsgs
  
      def errorSummary(self, errstring):
-@@ -598,6 +620,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -598,6 +634,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
              to not being installed, tell the user. """
          # always_output is a wart due to update/remove not producing the
          # same output.
@@ -79,7 +107,7 @@ index 9542b7a..b84183b 100644
          matches = self.doPackageLists(patterns=[arg], ignore_case=False)
          if (matches.installed or (not matches.available and
                                    self.returnInstalledPackagesByDep(arg))):
-@@ -777,14 +803,16 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -777,14 +817,16 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
             to be erased/removed"""
          
          oldcount = len(self.tsInfo)
@@ -101,7 +129,7 @@ index 9542b7a..b84183b 100644
              return 2, [msg]
          else:
              return 0, [_('No Packages marked for removal')]
-@@ -931,22 +959,71 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -931,22 +973,71 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
          searchlist = ['name', 'summary', 'description', 'url']
          dups = self.conf.showdupesfromrepos
          args = map(to_unicode, args)
@@ -178,7 +206,18 @@ index 9542b7a..b84183b 100644
          for arg in args:
              if arg not in akeys:
                  self.logger.warning(_('Warning: No matches found for: %s'), arg)
-@@ -1327,6 +1404,7 @@ class YumOptionParser(OptionParser):
+@@ -1278,7 +1369,9 @@ class YumOptionParser(OptionParser):
+         try:
+             args = _filtercmdline(
+                         ('--noplugins','--version','-q', '-v', "--quiet", "--verbose"), 
+-                        ('-c', '-d', '-e', '--installroot',
++                        ('-c', '--config', '-d', '--debuglevel',
++                         '-e', '--errorlevel',
++                         '--installroot',
+                          '--disableplugin', '--enableplugin', '--releasever',
+                          '--setopt'), 
+                         args)
+@@ -1327,6 +1420,7 @@ class YumOptionParser(OptionParser):
                  self.base.conf.obsoletes = 1
  
              if opts.installroot:
@@ -186,7 +225,7 @@ index 9542b7a..b84183b 100644
                  self.base.conf.installroot = opts.installroot
                  
              if opts.skipbroken:
-@@ -1395,6 +1473,7 @@ class YumOptionParser(OptionParser):
+@@ -1395,6 +1489,7 @@ class YumOptionParser(OptionParser):
              if opts.nogpgcheck:
                  self.base.conf.gpgcheck      = False
                  self.base.conf.repo_gpgcheck = False
@@ -194,7 +233,7 @@ index 9542b7a..b84183b 100644
                  for repo in self.base.repos.listEnabled():
                      repo.gpgcheck      = False
                      repo.repo_gpgcheck = False
-@@ -1406,7 +1485,18 @@ class YumOptionParser(OptionParser):
+@@ -1406,7 +1501,18 @@ class YumOptionParser(OptionParser):
           
          return opts, cmds
  
@@ -36468,7 +36507,7 @@ index 524db82..889353e 100644
  up.condenseUpdates()
  
 diff --git a/rpmUtils/updates.py b/rpmUtils/updates.py
-index c61788b..3c4bbb4 100644
+index c61788b..012d00d 100644
 --- a/rpmUtils/updates.py
 +++ b/rpmUtils/updates.py
 @@ -56,7 +56,8 @@ class Updates:
@@ -36498,6 +36537,49 @@ index c61788b..3c4bbb4 100644
              if (n, a) not in returndict:
                  returndict[(n, a)] = []
              if (e,v,r) in returndict[(n, a)]:
+@@ -187,15 +190,17 @@ class Updates:
+                         (flag, version, pkgtup) )
+ 
+         obsdict = {} # obseleting package -> [obsoleted package]
+-        pkgdict = self.makeNADict(pkglist, 1)
+ 
+         for pkgtup in pkglist:
+-            (name, arch, epoch, ver, rel) = pkgtup
++            name = pkgtup[0]
+             for obs_flag, obs_version, obsoleting in self._obsoletes_by_name.get(name, []):
+                 if obs_flag in [None, 0] and name == obsoleting[0]: continue
+                 if rpmUtils.miscutils.rangeCheck( (name, obs_flag, obs_version), pkgtup):
+                     obsdict.setdefault(obsoleting, []).append(pkgtup)
+ 
++        if not obsdict:
++            return {}
++
+         obslist = obsdict.keys()
+         if newest:
+             obslist = self._reduceListNewestByNameArch(obslist)
+@@ -690,17 +695,22 @@ class Updates:
+            compared to each other for highest version only foo.i386 and 
+            foo.i386 will be compared"""
+         highdict = {}
++        done = False
+         for pkgtup in tuplelist:
+             (n, a, e, v, r) = pkgtup
+             if (n, a) not in highdict:
+                 highdict[(n, a)] = pkgtup
+             else:
+                 pkgtup2 = highdict[(n, a)]
++                done = True
+                 (n2, a2, e2, v2, r2) = pkgtup2
+                 rc = rpmUtils.miscutils.compareEVR((e,v,r), (e2, v2, r2))
+                 if rc > 0:
+                     highdict[(n, a)] = pkgtup
+         
++        if not done:
++            return tuplelist
++
+         return highdict.values()
+ 
+             
 diff --git a/shell.py b/shell.py
 index f1c82a3..7eef413 100644
 --- a/shell.py
@@ -37730,7 +37812,7 @@ index c3c7133..fc05aa6 100644
  Requires: python-iniparse
  Requires: pygpgme
 diff --git a/yum/__init__.py b/yum/__init__.py
-index 2ea9f20..a588dc8 100644
+index 2ea9f20..cfb60b3 100644
 --- a/yum/__init__.py
 +++ b/yum/__init__.py
 @@ -21,6 +21,19 @@ The Yum RPM software updater.
@@ -37790,7 +37872,7 @@ index 2ea9f20..a588dc8 100644
          if releasever != None:
              startupconf.releasever = releasever
  
-@@ -395,7 +415,7 @@ class YumBase(depsolve.Depsolve):
+@@ -395,9 +415,12 @@ class YumBase(depsolve.Depsolve):
              else:
                  thisrepo.repo_config_age = repo_age
                  thisrepo.repofile = repofn
@@ -37798,8 +37880,13 @@ index 2ea9f20..a588dc8 100644
 +                
              if thisrepo.id in self.repo_setopts:
                  for opt in self.repo_setopts[thisrepo.id].items:
++                    if not hasattr(thisrepo, opt):
++                        msg = "Repo %s did not have a %s attr. before setopt"
++                        self.logger.warning(msg % (thisrepo.id, opt))
                      setattr(thisrepo, opt, getattr(self.repo_setopts[thisrepo.id], opt))
-@@ -442,7 +462,11 @@ class YumBase(depsolve.Depsolve):
+                     
+             if validate and not validate(thisrepo):
+@@ -442,7 +465,11 @@ class YumBase(depsolve.Depsolve):
          @return: YumRepository instance.
          '''
          repo = yumRepo.YumRepository(section)
@@ -37812,7 +37899,7 @@ index 2ea9f20..a588dc8 100644
  
          # Ensure that the repo name is set
          if not repo.name:
-@@ -752,7 +776,7 @@ class YumBase(depsolve.Depsolve):
+@@ -752,7 +779,7 @@ class YumBase(depsolve.Depsolve):
              groupfile = repo.getGroups()
              # open it up as a file object so iterparse can cope with our compressed file
              if groupfile:
@@ -37821,7 +37908,7 @@ index 2ea9f20..a588dc8 100644
                  
              try:
                  self._comps.add(groupfile)
-@@ -790,7 +814,8 @@ class YumBase(depsolve.Depsolve):
+@@ -790,7 +817,8 @@ class YumBase(depsolve.Depsolve):
                  # fetch the sqlite tagdb
                  try:
                      tag_md = repo.retrieveMD('pkgtags')
@@ -37831,7 +37918,7 @@ index 2ea9f20..a588dc8 100644
                      # feed it into _tags.add()
                      self._tags.add(repo.id, tag_sqlite)
                  except (Errors.RepoError, Errors.PkgTagsError), e:
-@@ -909,7 +934,10 @@ class YumBase(depsolve.Depsolve):
+@@ -909,7 +937,10 @@ class YumBase(depsolve.Depsolve):
  
          (rescode, restring) = self.resolveDeps()
          self._limit_installonly_pkgs()
@@ -37843,7 +37930,7 @@ index 2ea9f20..a588dc8 100644
          #  We _must_ get rid of all the used tses before we go on, so that C-c
          # works for downloads / mirror failover etc.
          kern_pkgtup = None
-@@ -976,8 +1004,8 @@ class YumBase(depsolve.Depsolve):
+@@ -976,8 +1007,8 @@ class YumBase(depsolve.Depsolve):
                  restring.append(_('Trying to remove "%s", which is protected') %
                                  pkgname)
  
@@ -37854,7 +37941,7 @@ index 2ea9f20..a588dc8 100644
          self.verbose_logger.debug('Depsolve time: %0.3f' % (time.time() - ds_st))
          return rescode, restring
  
-@@ -1032,7 +1060,7 @@ class YumBase(depsolve.Depsolve):
+@@ -1032,7 +1063,7 @@ class YumBase(depsolve.Depsolve):
              # and skip-broken shouldn't care too much about speed.
              self.rpmdb.transactionReset()
              self.installedFileRequires = None # Kind of hacky
@@ -37863,7 +37950,7 @@ index 2ea9f20..a588dc8 100644
              self._printTransaction()        
              depTree = self._buildDepTree()
              startTs = set(self.tsInfo)
-@@ -1089,7 +1117,7 @@ class YumBase(depsolve.Depsolve):
+@@ -1089,7 +1120,7 @@ class YumBase(depsolve.Depsolve):
                  self._checkUpdatedLeftovers() # Cleanup updated leftovers
                  rescode, restring = self.resolveDeps()
          if rescode != 1:
@@ -37872,7 +37959,7 @@ index 2ea9f20..a588dc8 100644
              self.verbose_logger.info(_('\nPackages skipped because of dependency problems:'))
              skipped_list = [p for p in skipped_po]
              skipped_list.sort()
-@@ -1203,14 +1231,14 @@ class YumBase(depsolve.Depsolve):
+@@ -1203,14 +1234,14 @@ class YumBase(depsolve.Depsolve):
                    TS_AVAILABLE  : "available",
                    TS_UPDATED    : "updated"}
  
@@ -37891,7 +37978,7 @@ index 2ea9f20..a588dc8 100644
                                      
      def _getPackagesToRemove(self,po,deptree,toRemove):
          '''
-@@ -1221,6 +1249,10 @@ class YumBase(depsolve.Depsolve):
+@@ -1221,6 +1252,10 @@ class YumBase(depsolve.Depsolve):
              for pkg in (txmbr.updates + txmbr.obsoletes):
                  toRemove.add(pkg)
                  self._getDepsToRemove(pkg, deptree, toRemove)
@@ -37902,7 +37989,7 @@ index 2ea9f20..a588dc8 100644
          self._getDepsToRemove(po, deptree, toRemove)
  
      def _getDepsToRemove(self,po, deptree, toRemove):
-@@ -1311,7 +1343,10 @@ class YumBase(depsolve.Depsolve):
+@@ -1311,7 +1346,10 @@ class YumBase(depsolve.Depsolve):
                  self.run_with_package_names.add('yum-metadata-parser')
                  break
  
@@ -37914,7 +38001,7 @@ index 2ea9f20..a588dc8 100644
              using_pkgs_pats = list(self.run_with_package_names)
              using_pkgs = self.rpmdb.returnPackages(patterns=using_pkgs_pats)
              rpmdbv  = self.rpmdb.simpleVersion(main_only=True)[0]
-@@ -1330,10 +1365,14 @@ class YumBase(depsolve.Depsolve):
+@@ -1330,10 +1368,14 @@ class YumBase(depsolve.Depsolve):
                  cmdline = ' '.join(self.args)
              elif hasattr(self, 'cmds') and self.cmds:
                  cmdline = ' '.join(self.cmds)
@@ -37929,7 +38016,7 @@ index 2ea9f20..a588dc8 100644
              
              self.plugins.run('historybegin')
          #  Just before we update the transaction, update what we think the
-@@ -1341,8 +1380,15 @@ class YumBase(depsolve.Depsolve):
+@@ -1341,8 +1383,15 @@ class YumBase(depsolve.Depsolve):
          # "something" happens and the rpmdb is different from what we think it
          # will be we store what we thought, not what happened (so it'll be an
          # invalid cache).
@@ -37946,7 +38033,7 @@ index 2ea9f20..a588dc8 100644
          errors = self.ts.run(cb.callback, '')
          # ts.run() exit codes are, hmm, "creative": None means all ok, empty 
          # list means some errors happened in the transaction and non-empty 
-@@ -1382,7 +1428,9 @@ class YumBase(depsolve.Depsolve):
+@@ -1382,7 +1431,9 @@ class YumBase(depsolve.Depsolve):
                  except (IOError, OSError), e:
                      self.logger.critical(_('Failed to remove transaction file %s') % fn)
  
@@ -37957,7 +38044,7 @@ index 2ea9f20..a588dc8 100644
          self.plugins.run('posttrans')
          # sync up what just happened versus what is in the rpmdb
          if not self.ts.isTsFlagSet(rpm.RPMTRANS_FLAG_TEST):
-@@ -1403,8 +1451,8 @@ class YumBase(depsolve.Depsolve):
+@@ -1403,8 +1454,8 @@ class YumBase(depsolve.Depsolve):
          #    that there is not also an install of this pkg in the tsInfo (reinstall)
          # for any kind of install add from_repo to the yumdb, and the cmdline
          # and the install reason
@@ -37968,7 +38055,7 @@ index 2ea9f20..a588dc8 100644
          self.plugins.run('preverifytrans')
          for txmbr in self.tsInfo:
              if txmbr.output_state in TS_INSTALL_STATES:
-@@ -1482,13 +1530,15 @@ class YumBase(depsolve.Depsolve):
+@@ -1482,13 +1533,15 @@ class YumBase(depsolve.Depsolve):
                  self.verbose_logger.log(logginglevels.DEBUG_2, 'What is this? %s' % txmbr.po)
  
          self.plugins.run('postverifytrans')
@@ -37985,7 +38072,7 @@ index 2ea9f20..a588dc8 100644
  
      def costExcludePackages(self):
          """ Create an excluder for repos. with higher cost. Eg.
-@@ -1836,6 +1886,10 @@ class YumBase(depsolve.Depsolve):
+@@ -1836,6 +1889,10 @@ class YumBase(depsolve.Depsolve):
  
          self.plugins.run('postdownload', pkglist=pkglist, errors=errors)
  
@@ -37996,7 +38083,7 @@ index 2ea9f20..a588dc8 100644
          return errors
  
      def verifyHeader(self, fo, po, raiseError):
-@@ -1919,7 +1973,7 @@ class YumBase(depsolve.Depsolve):
+@@ -1919,7 +1976,7 @@ class YumBase(depsolve.Depsolve):
              - 2 - Fatal GPG verification error, give up.
          '''
          if hasattr(po, 'pkgtype') and po.pkgtype == 'local':
@@ -38005,7 +38092,7 @@ index 2ea9f20..a588dc8 100644
              hasgpgkey = 0
          else:
              repo = self.repos.getRepo(po.repoid)
-@@ -2276,7 +2330,8 @@ class YumBase(depsolve.Depsolve):
+@@ -2276,7 +2333,8 @@ class YumBase(depsolve.Depsolve):
          return results
      
      # pre 3.2.10 API used to always showdups, so that's the default atm.
@@ -38015,7 +38102,7 @@ index 2ea9f20..a588dc8 100644
          """Generator method to lighten memory load for some searches.
             This is the preferred search function to use. Setting keys to True
             will use the search keys that matched in the sorting, and return
-@@ -2322,41 +2377,45 @@ class YumBase(depsolve.Depsolve):
+@@ -2322,41 +2380,45 @@ class YumBase(depsolve.Depsolve):
  
                  if len(tmpvalues) > 0:
                      sorted_lists[count].append((po, tmpkeys, tmpvalues))
@@ -38091,7 +38178,7 @@ index 2ea9f20..a588dc8 100644
  
          # take our existing dict-by-pkg and make the dict-by-count for 
          # this bizarro sorted_lists format
-@@ -2887,7 +2946,7 @@ class YumBase(depsolve.Depsolve):
+@@ -2887,7 +2949,7 @@ class YumBase(depsolve.Depsolve):
                  if len(dep_split) == 3:
                      depname, flagsymbol, depver = dep_split
                      if not flagsymbol in SYMBOLFLAGS:
@@ -38100,7 +38187,7 @@ index 2ea9f20..a588dc8 100644
                      depflags = SYMBOLFLAGS[flagsymbol]
  
          return self.rpmdb.getProvides(depname, depflags, depver).keys()
-@@ -3100,6 +3159,9 @@ class YumBase(depsolve.Depsolve):
+@@ -3100,6 +3162,9 @@ class YumBase(depsolve.Depsolve):
  
      def _find_obsoletees(self, po):
          """ Return the pkgs. that are obsoleted by the po we pass in. """
@@ -38110,7 +38197,7 @@ index 2ea9f20..a588dc8 100644
          if not isinstance(po, YumLocalPackage):
              for (obstup, inst_tup) in self.up.getObsoletersTuples(name=po.name):
                  if po.pkgtup == obstup:
-@@ -3160,7 +3222,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3160,7 +3225,7 @@ class YumBase(depsolve.Depsolve):
                      try:
                          mypkgs = self.returnPackagesByDep(arg)
                      except yum.Errors.YumBaseError, e:
@@ -38119,7 +38206,7 @@ index 2ea9f20..a588dc8 100644
                      else:
                          # install MTA* == fail, because provides don't do globs
                          # install /usr/kerberos/bin/* == success (and we want
-@@ -3490,7 +3552,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3490,7 +3555,7 @@ class YumBase(depsolve.Depsolve):
              availpkgs.extend(m)
  
              if not availpkgs and not instpkgs:
@@ -38128,7 +38215,7 @@ index 2ea9f20..a588dc8 100644
          
          else: # we have kwargs, sort them out.
              nevra_dict = self._nevra_kwarg_parse(kwargs)
-@@ -3576,6 +3638,9 @@ class YumBase(depsolve.Depsolve):
+@@ -3576,6 +3641,9 @@ class YumBase(depsolve.Depsolve):
                          self.tsInfo.addObsoleted(obsoletee, po)
                          tx_return.append(txmbr)
                  else:
@@ -38138,7 +38225,7 @@ index 2ea9f20..a588dc8 100644
                      txmbr = self._add_up_txmbr(requiringPo, po, installed_pkg)
                      tx_return.append(txmbr)
                          
-@@ -3599,6 +3664,9 @@ class YumBase(depsolve.Depsolve):
+@@ -3599,6 +3667,9 @@ class YumBase(depsolve.Depsolve):
                  
                  else:
                      updated_pkg =  self.getInstalledPackageObject(updated)
@@ -38148,7 +38235,7 @@ index 2ea9f20..a588dc8 100644
                      txmbr = self._add_up_txmbr(requiringPo,
                                                 available_pkg, updated_pkg)
                      tx_return.append(txmbr)
-@@ -3669,7 +3737,8 @@ class YumBase(depsolve.Depsolve):
+@@ -3669,7 +3740,8 @@ class YumBase(depsolve.Depsolve):
                          self.logger.critical(_('%s') % e)
                      
                      if not depmatches:
@@ -38158,7 +38245,7 @@ index 2ea9f20..a588dc8 100644
                      else:
                          pkgs.extend(depmatches)
                  
-@@ -3690,6 +3759,14 @@ class YumBase(depsolve.Depsolve):
+@@ -3690,6 +3762,14 @@ class YumBase(depsolve.Depsolve):
              if self.conf.protected_packages and po.pkgtup == kern_pkgtup:
                  self.logger.warning(_("Skipping the running kernel: %s") % po)
                  continue
@@ -38173,7 +38260,7 @@ index 2ea9f20..a588dc8 100644
              txmbr = self.tsInfo.addErase(po)
              tx_return.append(txmbr)
          
-@@ -3952,7 +4029,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3952,7 +4032,7 @@ class YumBase(depsolve.Depsolve):
              EOL """
  
          if not po and not kwargs:
@@ -38182,7 +38269,7 @@ index 2ea9f20..a588dc8 100644
  
          doing_group_pkgs = False
          if po:
-@@ -3975,7 +4052,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3975,7 +4055,7 @@ class YumBase(depsolve.Depsolve):
                      try:
                          apkgs = self.returnPackagesByDep(arg)
                      except yum.Errors.YumBaseError, e:
@@ -38191,7 +38278,7 @@ index 2ea9f20..a588dc8 100644
  
          else:
              nevra_dict = self._nevra_kwarg_parse(kwargs)
-@@ -4196,23 +4273,20 @@ class YumBase(depsolve.Depsolve):
+@@ -4196,23 +4276,20 @@ class YumBase(depsolve.Depsolve):
          key_installed = False
  
          self.logger.info(_('Retrieving GPG key from %s') % keyurl)
@@ -38221,7 +38308,7 @@ index 2ea9f20..a588dc8 100644
  
          except urlgrabber.grabber.URLGrabError, e:
              raise Errors.YumBaseError(_('GPG key retrieval failed: ') +
-@@ -4276,12 +4350,11 @@ class YumBase(depsolve.Depsolve):
+@@ -4276,12 +4353,11 @@ class YumBase(depsolve.Depsolve):
          keyurls = repo.gpgkey
          key_installed = False
  
@@ -38235,7 +38322,7 @@ index 2ea9f20..a588dc8 100644
                  # Check if key is already installed
                  if misc.keyInstalled(ts, info['keyid'], info['timestamp']) >= 0:
                      self.logger.info(_('GPG key at %s (0x%s) is already installed') % (
-@@ -4306,6 +4379,7 @@ class YumBase(depsolve.Depsolve):
+@@ -4306,6 +4382,7 @@ class YumBase(depsolve.Depsolve):
                      raise Errors.YumBaseError, _("Not installing key")
                  
                  # Import the key
@@ -38243,7 +38330,7 @@ index 2ea9f20..a588dc8 100644
                  result = ts.pgpImportPubkey(misc.procgpgkey(info['raw_key']))
                  if result != 0:
                      raise Errors.YumBaseError, \
-@@ -4626,6 +4700,7 @@ class YumBase(depsolve.Depsolve):
+@@ -4626,6 +4703,7 @@ class YumBase(depsolve.Depsolve):
          newrepo = yumRepo.YumRepository(repoid)
          newrepo.name = repoid
          newrepo.basecachedir = self.conf.cachedir
@@ -38251,7 +38338,7 @@ index 2ea9f20..a588dc8 100644
          var_convert = kwargs.get('variable_convert', True)
          
          if baseurls:
-@@ -4722,3 +4797,267 @@ class YumBase(depsolve.Depsolve):
+@@ -4722,3 +4800,267 @@ class YumBase(depsolve.Depsolve):
          self.plugins.run('verify_package', verify_package=verify_package)
          return verify_package
  
@@ -38579,7 +38666,7 @@ index 06d5a6b..5c728d4 100644
  # it under the terms of the GNU General Public License as published by
  # the Free Software Foundation; either version 2 of the License, or
 diff --git a/yum/depsolve.py b/yum/depsolve.py
-index e9b3fa7..b0d1e80 100644
+index e9b3fa7..de2849a 100644
 --- a/yum/depsolve.py
 +++ b/yum/depsolve.py
 @@ -38,7 +38,7 @@ import Errors
@@ -38667,7 +38754,29 @@ index e9b3fa7..b0d1e80 100644
                  self.dsCallback.pkgAdded(txmbr.pkgtup, dscb_ts_state)
              self.verbose_logger.log(logginglevels.DEBUG_2,
                                      _("Checking deps for %s") %(txmbr,))
-@@ -1092,6 +1124,10 @@ class Depsolve(object):
+@@ -882,7 +914,7 @@ class Depsolve(object):
+         for req in sorted(txmbr_reqs, key=self._sort_req_key):
+             if req[0].startswith('rpmlib('):
+                 continue
+-            if req in oldreqs and self.rpmdb.getProvides(*req):
++            if req in oldreqs:
+                 continue
+             
+             self.verbose_logger.log(logginglevels.DEBUG_2, _("looking for %s as a requirement of %s"), req, txmbr)
+@@ -1071,8 +1103,11 @@ class Depsolve(object):
+         for po in self.rpmdb.returnConflictPackages():
+             if self.tsInfo.getMembersWithState(po.pkgtup, output_states=TS_REMOVE_STATES):
+                 continue
++            conflicts = po.returnPrco('conflicts')
++            if not conflicts: # We broke this due to dbMatch() usage.
++                continue
+             cpkgs.append(po)
+-            for conflict in po.returnPrco('conflicts'):
++            for conflict in conflicts:
+                 (r, f, v) = conflict
+                 for conflicting_po in self.tsInfo.getNewProvides(r, f, v):
+                     if conflicting_po.pkgtup[0] == po.pkgtup[0] and conflicting_po.pkgtup[2:] == po.pkgtup[2:]:
+@@ -1092,6 +1127,10 @@ class Depsolve(object):
                          continue
                      ret.append( (po, self._prco_req_nfv2req(r, f, v),
                                   conflicting_po) )
@@ -38678,7 +38787,7 @@ index e9b3fa7..b0d1e80 100644
          self.rpmdb.transactionCacheConflictPackages(cpkgs)
          return ret
  
-@@ -1195,6 +1231,10 @@ class Depsolve(object):
+@@ -1195,6 +1234,10 @@ class Depsolve(object):
                      #  We get here from bestPackagesFromList(), give a giant
                      # bump to stuff that is already installed.
                      pkgresults[pkg] += 1000
@@ -39439,10 +39548,18 @@ index afc7947..31b1080 100755
                  if cpeid:
                      tag = """   <distro cpeid="%s">%s</distro>\n""" % (
 diff --git a/yum/rpmsack.py b/yum/rpmsack.py
-index ae73c32..e227729 100644
+index ae73c32..2302cf6 100644
 --- a/yum/rpmsack.py
 +++ b/yum/rpmsack.py
-@@ -78,8 +78,32 @@ class RPMInstalledPackage(YumInstalledPackage):
+@@ -40,6 +40,7 @@ import yum.depsolve
+ class RPMInstalledPackage(YumInstalledPackage):
+ 
+     def __init__(self, rpmhdr, index, rpmdb):
++        self._has_hdr = True
+         YumInstalledPackage.__init__(self, rpmhdr, yumdb=rpmdb.yumdb)
+         # NOTE: We keep summary/description/url because it doesn't add much
+         # and "yum search" uses them all.
+@@ -78,8 +79,32 @@ class RPMInstalledPackage(YumInstalledPackage):
                                 # Also note that pkg.no_value raises KeyError.
  
          return val
@@ -39476,7 +39593,7 @@ index ae73c32..e227729 100644
  class RPMDBProblem:
      '''
      Represents a problem in the rpmdb, from the check_*() functions.
-@@ -195,13 +219,20 @@ class RPMDBPackageSack(PackageSackBase):
+@@ -195,13 +220,20 @@ class RPMDBPackageSack(PackageSackBase):
              }
          
          addldb_path = os.path.normpath(self._persistdir + '/yumdb')
@@ -39498,7 +39615,7 @@ index ae73c32..e227729 100644
              for (hdr, mi) in self._all_packages():
                  self._simple_pkgtup_list.append(self._hdr2pkgTuple(hdr))
              
-@@ -210,6 +241,10 @@ class RPMDBPackageSack(PackageSackBase):
+@@ -210,6 +242,10 @@ class RPMDBPackageSack(PackageSackBase):
      pkglist = property(_get_pkglist, None)
  
      def dropCachedData(self):
@@ -39509,7 +39626,7 @@ index ae73c32..e227729 100644
          self._idx2pkg = {}
          self._name2pkg = {}
          self._pkgnames_loaded = set()
-@@ -236,6 +271,80 @@ class RPMDBPackageSack(PackageSackBase):
+@@ -236,6 +272,80 @@ class RPMDBPackageSack(PackageSackBase):
          self.transactionReset() # Should do nothing, but meh...
          self._cached_rpmdb_mtime = None
  
@@ -39590,7 +39707,7 @@ index ae73c32..e227729 100644
      def setCacheDir(self, cachedir):
          """ Sets the internal cachedir value for the rpmdb, to be the
              "rpmdb-indexes" directory in the persisent yum storage. """
-@@ -244,6 +353,10 @@ class RPMDBPackageSack(PackageSackBase):
+@@ -244,6 +354,10 @@ class RPMDBPackageSack(PackageSackBase):
          else:
              self._cachedir = '/' + cachedir
  
@@ -39601,7 +39718,7 @@ index ae73c32..e227729 100644
      def readOnlyTS(self):
          if not self.ts:
              self.ts =  initReadOnlyTransaction(root=self.root)
-@@ -293,6 +406,7 @@ class RPMDBPackageSack(PackageSackBase):
+@@ -293,6 +407,7 @@ class RPMDBPackageSack(PackageSackBase):
          ts = self.readOnlyTS()
          result = {}
          
@@ -39609,7 +39726,7 @@ index ae73c32..e227729 100644
          mi = ts.dbMatch('basenames', name)
          for hdr in mi:
              if hdr['name'] == 'gpg-pubkey':
-@@ -511,12 +625,34 @@ class RPMDBPackageSack(PackageSackBase):
+@@ -511,12 +626,38 @@ class RPMDBPackageSack(PackageSackBase):
          return pkgobjlist
  
      def _uncached_returnConflictPackages(self):
@@ -39631,6 +39748,10 @@ index ae73c32..e227729 100644
 +                if hdr['name'] == 'gpg-pubkey': # Just in case...
 +                    continue
 +
++                if not hdr[rpm.RPMTAG_CONFLICTNAME]:
++                    # Pre. rpm-4.9.x the above dbMatch() does nothing.
++                    continue
++
 +                po = self._makePackageObject(hdr, mi.instance())
 +                result[po.pkgid] = po
 +                if po._has_hdr:
@@ -39649,7 +39770,7 @@ index ae73c32..e227729 100644
          return self._cached_conflicts_data
  
      def _write_conflicts_new(self, pkgs, rpmdbv):
-@@ -543,7 +679,7 @@ class RPMDBPackageSack(PackageSackBase):
+@@ -543,7 +684,7 @@ class RPMDBPackageSack(PackageSackBase):
          misc.unlink_f(self._cachedir + "/version")
          misc.unlink_f(self._cachedir + '/conflicts')
          misc.unlink_f(self._cachedir + '/file-requires')
@@ -39658,7 +39779,7 @@ index ae73c32..e227729 100644
          #  We have a couple of options here, we can:
          #
          # . Ignore it and continue - least invasive, least likely to get any
-@@ -627,8 +763,8 @@ class RPMDBPackageSack(PackageSackBase):
+@@ -627,8 +768,8 @@ class RPMDBPackageSack(PackageSackBase):
              data = self._trans_cache_store['file-requires']
              self._write_file_requires(rpmdbv, data)
  
@@ -39669,7 +39790,7 @@ index ae73c32..e227729 100644
              self._write_package_checksums(rpmdbv, data)
  
          self._trans_cache_store = {}
-@@ -803,22 +939,23 @@ class RPMDBPackageSack(PackageSackBase):
+@@ -803,22 +944,23 @@ class RPMDBPackageSack(PackageSackBase):
          os.rename(self._cachedir + '/file-requires.tmp',
                    self._cachedir + '/file-requires')
  
@@ -39697,7 +39818,7 @@ index ae73c32..e227729 100644
          frpmdbv = fo.readline()
          if not frpmdbv or rpmdbv != frpmdbv[:-1]:
              return
-@@ -837,7 +974,10 @@ class RPMDBPackageSack(PackageSackBase):
+@@ -837,7 +979,10 @@ class RPMDBPackageSack(PackageSackBase):
  
                  T = _read_str(fo)
                  D = _read_str(fo)
@@ -39709,7 +39830,7 @@ index ae73c32..e227729 100644
  
              if fo.readline() != '': # Should be EOF
                  return
-@@ -845,7 +985,13 @@ class RPMDBPackageSack(PackageSackBase):
+@@ -845,7 +990,13 @@ class RPMDBPackageSack(PackageSackBase):
              self._deal_with_bad_rpmdbcache("pkg checksums")
              return
  
@@ -39723,7 +39844,7 @@ index ae73c32..e227729 100644
              (n, a, e, v, r) = pkgtup
              pkg = self.searchNevra(n, e, v, r, a)
              if not pkg:
-@@ -863,24 +1009,26 @@ class RPMDBPackageSack(PackageSackBase):
+@@ -863,24 +1014,26 @@ class RPMDBPackageSack(PackageSackBase):
          if not self.__cache_rpmdb__:
              return
  
@@ -39754,7 +39875,7 @@ index ae73c32..e227729 100644
  
      def _get_cached_simpleVersion_main(self):
          """ Return the cached string of the main rpmdbv. """
-@@ -1046,7 +1194,6 @@ class RPMDBPackageSack(PackageSackBase):
+@@ -1046,7 +1199,6 @@ class RPMDBPackageSack(PackageSackBase):
          if self.auto_close:
              self.ts.close()
  
@@ -39762,7 +39883,7 @@ index ae73c32..e227729 100644
      def _header_from_index(self, idx):
          """returns a package header having been given an index"""
          warnings.warn('_header_from_index() will go away in a future version of Yum.\n',
-@@ -1422,9 +1569,10 @@ class RPMDBAdditionalData(object):
+@@ -1422,9 +1574,10 @@ class RPMDBAdditionalData(object):
      # dirs have files per piece of info we're keeping
      #    repoid, install reason, status, blah, (group installed for?), notes?
      
@@ -39774,7 +39895,7 @@ index ae73c32..e227729 100644
          self.conf.writable = False
          
          self._packages = {} # pkgid = dir
-@@ -1566,7 +1714,6 @@ class RPMDBAdditionalDataPackage(object):
+@@ -1566,7 +1719,6 @@ class RPMDBAdditionalDataPackage(object):
  
          self._yumdb_cache['attr'][value][2].add(fn)
          self._yumdb_cache[fn] = value
@@ -39782,7 +39903,7 @@ index ae73c32..e227729 100644
  
          return True
  
-@@ -1587,6 +1734,11 @@ class RPMDBAdditionalDataPackage(object):
+@@ -1587,6 +1739,11 @@ class RPMDBAdditionalDataPackage(object):
          if attr.endswith('.tmp'):
              raise AttributeError, "Cannot set attribute %s on %s" % (attr, self)
  
@@ -40023,7 +40144,7 @@ index 31d3569..b0c7ddd 100644
 +
 +        return msg
 diff --git a/yum/update_md.py b/yum/update_md.py
-index 9e492ba..56b5307 100644
+index 9e492ba..83e56c6 100644
 --- a/yum/update_md.py
 +++ b/yum/update_md.py
 @@ -26,7 +26,7 @@ import sys
@@ -40051,7 +40172,7 @@ index 9e492ba..56b5307 100644
          self._md[item] = val
  
 -    def __str__(self):
-+    def text(self, skip_data=('files', 'summary', 'solution')):
++    def text(self, skip_data=('files', 'summary', 'rights', 'solution')):
          head = """
  ===============================================================================
    %(title)s
diff --git a/yum.spec b/yum.spec
index 3ba5bc6..ef184b5 100644
--- a/yum.spec
+++ b/yum.spec
@@ -5,7 +5,7 @@
 Summary: RPM installer/updater
 Name: yum
 Version: 3.2.28
-Release: 13%{?dist}
+Release: 14%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 Source0: http://yum.baseurl.org/download/3.2/%{name}-%{version}.tar.gz
@@ -156,6 +156,10 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{yum_pluginslib}
 
 %changelog
+* Thu Nov 11 2010 James Antill <james at fedoraproject.org> - 3.2.28-14
+- latest head
+- Perf. fixes/improvements.
+
 * Tue Nov  9 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.2.28-13
 - once again with head
 


More information about the scm-commits mailing list