rpms/yum/devel yum-HEAD.patch,1.23,1.24 yum.spec,1.261,1.262

James Antill james at fedoraproject.org
Sun Jun 21 06:10:37 UTC 2009


Author: james

Update of /cvs/pkgs/rpms/yum/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5062

Modified Files:
	yum-HEAD.patch yum.spec 
Log Message:
* Sun Jun 21 2009 James Antill <james at fedoraproject.org> - 3.2.23-6
- Update to latest head:
- Unbreak delPackage() excludes.
- Other fixes/etc.


yum-HEAD.patch:

Index: yum-HEAD.patch
===================================================================
RCS file: /cvs/pkgs/rpms/yum/devel/yum-HEAD.patch,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- yum-HEAD.patch	18 Jun 2009 19:46:27 -0000	1.23
+++ yum-HEAD.patch	21 Jun 2009 06:10:34 -0000	1.24
@@ -7324,7 +7324,7 @@ index 322765e..6f0ffe4 100644
      pass
  
 diff --git a/yum/__init__.py b/yum/__init__.py
-index 6378cdc..1a3ee3f 100644
+index 6378cdc..2a1f806 100644
 --- a/yum/__init__.py
 +++ b/yum/__init__.py
 @@ -43,8 +43,7 @@ except ImportError:
@@ -7458,7 +7458,7 @@ index 6378cdc..1a3ee3f 100644
          for txmbr in self.tsInfo:
              if txmbr.output_state in TS_INSTALL_STATES:
                  if not self.rpmdb.contains(po=txmbr.po):
-@@ -1017,11 +1036,21 @@ class YumBase(depsolve.Depsolve):
+@@ -1017,11 +1036,34 @@ class YumBase(depsolve.Depsolve):
                                             ' but is not!' % txmbr.po))
                      continue
                  po = self.rpmdb.searchPkgTuple(txmbr.pkgtup)[0]
@@ -7473,6 +7473,19 @@ index 6378cdc..1a3ee3f 100644
 +                if csum is not None:
 +                    po.yumdb_info.checksum_type = str(csum[0])
 +                    po.yumdb_info.checksum_data = str(csum[1])
++
++                if isinstance(rpo, YumLocalPackage):
++                    try:
++                        st = os.stat(rpo.localPkg())
++                        lp_ctime = str(int(st.st_ctime))
++                        lp_mtime = str(int(st.st_mtime))
++                        po.yumdb_info.from_repo_revision  = lp_ctime
++                        po.yumdb_info.from_repo_timestamp = lp_mtime
++                    except: pass
++
++                if not hasattr(rpo.repo, 'repoXML'):
++                    continue
++
 +                md = rpo.repo.repoXML
 +                if md and md.revision is not None:
 +                    po.yumdb_info.from_repo_revision  = str(md.revision)
@@ -7481,7 +7494,7 @@ index 6378cdc..1a3ee3f 100644
              
              elif txmbr.output_state in TS_REMOVE_STATES:
                  if self.rpmdb.contains(po=txmbr.po):
-@@ -1037,7 +1066,7 @@ class YumBase(depsolve.Depsolve):
+@@ -1037,7 +1079,7 @@ class YumBase(depsolve.Depsolve):
              else:
                  self.verbose_logger.log(logginglevels.DEBUG_2, 'What is this? %s' % txmbr.po)
  
@@ -7490,7 +7503,7 @@ index 6378cdc..1a3ee3f 100644
  
      def costExcludePackages(self):
          """exclude packages if they have an identical package in another repo
-@@ -1102,24 +1131,8 @@ class YumBase(depsolve.Depsolve):
+@@ -1102,24 +1144,8 @@ class YumBase(depsolve.Depsolve):
              excludelist = repo.getExcludePkgList()
              repoid = repo.id
  
@@ -7517,7 +7530,7 @@ index 6378cdc..1a3ee3f 100644
  
      def includePackages(self, repo):
          """removes packages from packageSacks based on list of packages, to include.
-@@ -1130,29 +1143,9 @@ class YumBase(depsolve.Depsolve):
+@@ -1130,29 +1156,9 @@ class YumBase(depsolve.Depsolve):
          if len(includelist) == 0:
              return
          
@@ -7550,7 +7563,7 @@ index 6378cdc..1a3ee3f 100644
          
      def doLock(self, lockfile = YUM_PID_FILE):
          """perform the yum locking, raise yum-based exceptions, not OSErrors"""
-@@ -2208,10 +2201,10 @@ class YumBase(depsolve.Depsolve):
+@@ -2208,10 +2214,10 @@ class YumBase(depsolve.Depsolve):
                      # sure we'll catch it if its added later in this transaction
                      pkgs = self.pkgSack.searchNevra(name=condreq)
                      if pkgs:
@@ -7563,7 +7576,7 @@ index 6378cdc..1a3ee3f 100644
                                  best.append('noarch')
                                  for pkg in pkgs:
                                      if pkg.arch in best:
-@@ -2416,7 +2409,7 @@ class YumBase(depsolve.Depsolve):
+@@ -2416,7 +2422,7 @@ class YumBase(depsolve.Depsolve):
             multilib to singlelib packages""" 
      
          returnlist = []
@@ -7572,7 +7585,7 @@ index 6378cdc..1a3ee3f 100644
          multiLib = []
          singleLib = []
          noarch = []
-@@ -2425,7 +2418,7 @@ class YumBase(depsolve.Depsolve):
+@@ -2425,7 +2431,7 @@ class YumBase(depsolve.Depsolve):
                  continue
              elif po.arch in ("noarch"):
                  noarch.append(po)
@@ -7581,7 +7594,7 @@ index 6378cdc..1a3ee3f 100644
                  multiLib.append(po)
              else:
                  singleLib.append(po)
-@@ -2614,14 +2607,14 @@ class YumBase(depsolve.Depsolve):
+@@ -2614,14 +2620,14 @@ class YumBase(depsolve.Depsolve):
  
                  
                  # only do these things if we're multilib
@@ -7598,7 +7611,7 @@ index 6378cdc..1a3ee3f 100644
                              best.append('noarch')
                              for pkg in pkgs:
                                  if pkg.arch in best:
-@@ -3085,7 +3078,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3085,7 +3091,7 @@ class YumBase(depsolve.Depsolve):
          # do this: but it's not a config file sort of thing
          # FIXME: Should add noarch, yum localinstall works ...
          # just rm this method?
@@ -7607,7 +7620,7 @@ index 6378cdc..1a3ee3f 100644
              self.logger.critical(_('Cannot add package %s to transaction. Not a compatible architecture: %s'), pkg, po.arch)
              return tx_return
          
-@@ -3110,8 +3103,8 @@ class YumBase(depsolve.Depsolve):
+@@ -3110,8 +3116,8 @@ class YumBase(depsolve.Depsolve):
                      updatepkgs.append((po, installed_pkg))
              elif po.verEQ(installed_pkg):
                  if (po.arch != installed_pkg.arch and
@@ -7618,7 +7631,7 @@ index 6378cdc..1a3ee3f 100644
                      installpkgs.append(po)
                  else:
                      donothingpkgs.append(po)
-@@ -3171,7 +3164,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3171,7 +3177,7 @@ class YumBase(depsolve.Depsolve):
              self.verbose_logger.log(logginglevels.INFO_2,
                  _('Examining %s: %s'), po.localpath, po)
  
@@ -7627,16 +7640,22 @@ index 6378cdc..1a3ee3f 100644
              self.logger.critical(_('Cannot add package %s to transaction. Not a compatible architecture: %s'), pkg, po.arch)
              return []
  
-@@ -3199,7 +3192,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3197,9 +3203,12 @@ class YumBase(depsolve.Depsolve):
+                              rpm.RPMPROB_FILTER_REPLACEOLDFILES)
+ 
          tx_mbrs = []
-         tx_mbrs.extend(self.remove(po, **kwargs))
+-        tx_mbrs.extend(self.remove(po, **kwargs))
++        if po: # The po, is the "available" po ... we want the installed po
++            tx_mbrs.extend(self.remove(pkgtup=po.pkgtup))
++        else:
++            tx_mbrs.extend(self.remove(**kwargs))
          if not tx_mbrs:
 -            raise Errors.ReinstallError, _("Problem in reinstall: no package matched to remove")
 +            raise Errors.ReinstallRemoveError, _("Problem in reinstall: no package matched to remove")
          templen = len(tx_mbrs)
          # this is a reinstall, so if we can't reinstall exactly what we uninstalled
          # then we really shouldn't go on
-@@ -3229,7 +3222,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3229,7 +3238,7 @@ class YumBase(depsolve.Depsolve):
              if len(members) == 0:
                  self.tsInfo.remove(item.pkgtup)
                  tx_mbrs.remove(item)
@@ -7645,7 +7664,7 @@ index 6378cdc..1a3ee3f 100644
              new_members.extend(members)
  
          tx_mbrs.extend(new_members)
-@@ -3255,7 +3248,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3255,7 +3264,7 @@ class YumBase(depsolve.Depsolve):
              self.verbose_logger.log(logginglevels.INFO_2,
                  _('Examining %s: %s'), po.localpath, po)
  
@@ -7654,7 +7673,7 @@ index 6378cdc..1a3ee3f 100644
              self.logger.critical(_('Cannot add package %s to transaction. Not a compatible architecture: %s'), pkg, po.arch)
              return []
  
-@@ -3385,14 +3378,11 @@ class YumBase(depsolve.Depsolve):
+@@ -3385,14 +3394,11 @@ class YumBase(depsolve.Depsolve):
              na = (po.name, po.arch)
              if na not in downgrade_apkgs:
                  continue
@@ -7672,7 +7691,7 @@ index 6378cdc..1a3ee3f 100644
  
          return tx_return
          
-@@ -3596,6 +3586,36 @@ class YumBase(depsolve.Depsolve):
+@@ -3596,6 +3602,36 @@ class YumBase(depsolve.Depsolve):
  
  
      def _limit_installonly_pkgs(self):
@@ -7709,7 +7728,7 @@ index 6378cdc..1a3ee3f 100644
          if self.conf.installonly_limit < 1 :
              return 
              
-@@ -3612,9 +3632,9 @@ class YumBase(depsolve.Depsolve):
+@@ -3612,9 +3648,9 @@ class YumBase(depsolve.Depsolve):
                  if (m.name == instpkg or instpkg in m.po.provides_names) \
                         and m.ts_state in ('i', 'u'):
                      installed = self.rpmdb.searchNevra(name=m.name)
@@ -7720,7 +7739,7 @@ index 6378cdc..1a3ee3f 100644
                          for po in installed:
                              if (po.version, po.release) == (cur_kernel_v, cur_kernel_r): 
                                  # don't remove running
-@@ -3828,3 +3848,19 @@ class YumBase(depsolve.Depsolve):
+@@ -3828,3 +3864,19 @@ class YumBase(depsolve.Depsolve):
          self.repos.enableRepo(newrepo.id)
          return newrepo
  
@@ -7792,7 +7811,7 @@ index 9a47f1c..4737bd1 100644
      
      # Add in some extra attributes which aren't actually configuration values 
 diff --git a/yum/depsolve.py b/yum/depsolve.py
-index 370d12a..81de803 100644
+index 370d12a..dc9b388 100644
 --- a/yum/depsolve.py
 +++ b/yum/depsolve.py
 @@ -15,7 +15,7 @@
@@ -7823,25 +7842,45 @@ index 370d12a..81de803 100644
                  if x_dist == 0: # can't really use best's arch anyway...
                      self.verbose_logger.log(logginglevels.DEBUG_4,
                          _("better arch in po %s") %(y))
-@@ -1106,6 +1105,7 @@ class Depsolve(object):
+@@ -1067,12 +1066,13 @@ class Depsolve(object):
+ 
+         for pkg in pkgs:
+             pkgresults[pkg] = 0
+-            if self.rpmdb.contains(pkg.name):
++
++            rpmdbpkgs = self.rpmdb.searchNevra(name=pkg.name)
++            if rpmdbpkgs:
+                 #  We only want to count things as "installed" if they are
+                 # older than what we are comparing, because this then an update
+                 # so we give preference. If they are newer then obsoletes/etc.
+                 # could play a part ... this probably needs a better fix.
+-                rpmdbpkgs = self.rpmdb.returnPackages(patterns=[pkg.name])
+                 newest = sorted(rpmdbpkgs)[-1]
+                 if newest.verLT(pkg):
+                     ipkgresults[pkg] = 0
+@@ -1106,6 +1106,8 @@ class Depsolve(object):
          
          # add the negative of the length of the name to the score
          
 +        
++        lpos = {}
          for po in pkgs:
              for nextpo in pkgs:
                  if po == nextpo:
-@@ -1115,8 +1115,7 @@ class Depsolve(object):
+@@ -1115,9 +1117,9 @@ class Depsolve(object):
                  # treat it like it's obsoleted. The problem here is X-1
                  # accidentally provides FOO, so you release X-2 without the
                  # provide, but X-1 is still picked over a real provider.
 -                na = (po.name,po.arch)
 -                lpos = self.pkgSack.returnNewestByNameArch(naTup=na)
-+                lpos = self.pkgSack.returnNewestByName(po.name)
-                 if not lpos or po != sorted(lpos)[-1]:
+-                if not lpos or po != sorted(lpos)[-1]:
++                if po.name not in lpos:
++                    lpos[po.name] = self.pkgSack.returnNewestByName(po.name)[:1]
++                if not lpos[po.name] or not po.verEQ(lpos[po.name][0]):
                      pkgresults[po] -= 1024
  
-@@ -1130,9 +1129,9 @@ class Depsolve(object):
+                 obsoleted = False
+@@ -1130,9 +1132,9 @@ class Depsolve(object):
                          _("%s obsoletes %s") % (nextpo, po))
  
                  if reqpo:
@@ -7874,10 +7913,10 @@ index 7d4ee61..2135634 100644
      class hashlib:
  
 diff --git a/yum/packageSack.py b/yum/packageSack.py
-index f405217..16c4f1e 100644
+index f405217..633100d 100644
 --- a/yum/packageSack.py
 +++ b/yum/packageSack.py
-@@ -25,6 +25,22 @@ import fnmatch
+@@ -25,6 +25,30 @@ import fnmatch
  import misc
  from packages import parsePackages
  
@@ -7889,6 +7928,14 @@ index f405217..16c4f1e 100644
 +    def __str__(self):
 +        return "%u:%s" % (self._num, self._chksum.hexdigest())
 +
++    def __eq__(self, other):
++        if other is None: return False
++        if self._num != other._num: return False
++        if self._chksum.digest() != other._chksum.digest(): return False
++        return True
++    def __ne__(self, other):
++        return not (self == other)
++
 +    def update(self, pkg, csum):
 +        self._num += 1
 +        self._chksum.update(str(pkg))
@@ -7900,7 +7947,7 @@ index f405217..16c4f1e 100644
  class PackageSackBase(object):
      """Base class that provides the interface for PackageSacks."""
      def __init__(self):
-@@ -148,6 +164,29 @@ class PackageSackBase(object):
+@@ -148,6 +172,29 @@ class PackageSackBase(object):
          """return list of all packages"""
          raise NotImplementedError()
  
@@ -7930,7 +7977,7 @@ index f405217..16c4f1e 100644
      def returnNewestByNameArch(self, naTup=None,
                                 patterns=None, ignore_case=False):
          """return list of newest packages based on name, arch matching
-@@ -397,6 +436,13 @@ class MetaSack(PackageSackBase):
+@@ -397,6 +444,13 @@ class MetaSack(PackageSackBase):
          return self.sacks[repoid].returnPackages(patterns=patterns,
                                                   ignore_case=ignore_case)
  
@@ -7945,7 +7992,7 @@ index f405217..16c4f1e 100644
                                 patterns=None, ignore_case=False):
          """return list of newest packages based on name, arch matching
 diff --git a/yum/packages.py b/yum/packages.py
-index e3a12f2..9827f9d 100644
+index e3a12f2..6cd34ef 100644
 --- a/yum/packages.py
 +++ b/yum/packages.py
 @@ -27,8 +27,8 @@ import re
@@ -7988,7 +8035,21 @@ index e3a12f2..9827f9d 100644
              if pre:
                  prcostring += ''' pre="%s"''' % pre
                      
-@@ -1386,8 +1386,14 @@ class YumInstalledPackage(YumHeaderPackage):
+@@ -1123,7 +1123,12 @@ class YumHeaderPackage(YumAvailablePackage):
+         if thing.startswith('__') and thing.endswith('__'):
+             if not hasattr(self, thing):
+                 raise AttributeError, "%s has no attribute %s" % (self, thing)
+-        return self.hdr[thing]
++        try:
++            return self.hdr[thing]
++        except KeyError:
++            #  Note above, API break to fix this ... this at least is a nicer
++            # msg. so we know what we accessed that is bad.
++            raise KeyError, "%s has no attribute %s" % (self, thing)
+ 
+     def doepoch(self):
+         tmpepoch = self.hdr['epoch']
+@@ -1386,8 +1391,14 @@ class YumInstalledPackage(YumHeaderPackage):
                  # stat
                  my_st = os.lstat(fn)
                  my_st_size = my_st.st_size
@@ -8005,7 +8066,7 @@ index e3a12f2..9827f9d 100644
  
                  if mode < 0:
                      # Stupid rpm, should be unsigned value but is signed ...
-@@ -1481,7 +1487,10 @@ class YumInstalledPackage(YumHeaderPackage):
+@@ -1481,7 +1492,10 @@ class YumInstalledPackage(YumHeaderPackage):
                      if gen_csum and my_csum != csum and have_prelink:
                          #  This is how rpm -V works, try and if that fails try
                          # again with prelink.
@@ -8018,7 +8079,7 @@ index e3a12f2..9827f9d 100644
                          fp = _CountedReadFile(fp)
                          my_csum = misc.checksum(csum_type, fp)
 diff --git a/yum/rpmsack.py b/yum/rpmsack.py
-index 5189b18..c5a5b77 100644
+index 5189b18..dbf01f9 100644
 --- a/yum/rpmsack.py
 +++ b/yum/rpmsack.py
 @@ -25,7 +25,7 @@ from rpmUtils.transaction import initReadOnlyTransaction
@@ -8042,6 +8103,21 @@ index 5189b18..c5a5b77 100644
          self._cache = {
              'provides' : { },
              'requires' : { },
+@@ -265,12 +268,12 @@ class RPMDBPackageSack(PackageSackBase):
+         
+         (name, arch) = naTup
+ 
+-        allpkg = [ po.pkgtup for po in self._search(name=name, arch=arch) ]
++        allpkg = self._search(name=name, arch=arch)
+ 
+         if not allpkg:
+             raise Errors.PackageSackError, 'No Package Matching %s' % name
+ 
+-        return misc.newestInList(allpkg)
++        return [ po.pkgtup for po in misc.newestInList(allpkg) ]
+ 
+     def returnNewestByName(self, name=None):
+         if not name:
 @@ -332,6 +335,32 @@ class RPMDBPackageSack(PackageSackBase):
              pkgobjlist = pkgobjlist[0] + pkgobjlist[1]
          return pkgobjlist
@@ -8075,7 +8151,17 @@ index 5189b18..c5a5b77 100644
      @staticmethod
      def _find_search_fields(fields, searchstrings, hdr):
          count = 0
-@@ -735,6 +764,9 @@ class RPMDBAdditionalDataPackage(object):
+@@ -419,8 +448,7 @@ class RPMDBPackageSack(PackageSackBase):
+ 
+ 
+     def _search(self, name=None, epoch=None, ver=None, rel=None, arch=None):
+-        '''Generator that yields matching packages
+-        '''
++        '''List of matching packages, to zero or more of NEVRA.'''
+         pkgtup = (name, arch, epoch, ver, rel)
+         if self._tup2pkg.has_key(pkgtup):
+             return [self._tup2pkg[pkgtup]]
+@@ -735,6 +763,9 @@ class RPMDBAdditionalDataPackage(object):
      def _read(self, attr):
          attr = _sanitize(attr)
  
@@ -8085,7 +8171,7 @@ index 5189b18..c5a5b77 100644
          if attr in self._read_cached_data:
              return self._read_cached_data[attr]
  
-@@ -751,7 +783,7 @@ class RPMDBAdditionalDataPackage(object):
+@@ -751,7 +782,7 @@ class RPMDBAdditionalDataPackage(object):
      def _delete(self, attr):
          """remove the attribute file"""
  
@@ -8094,7 +8180,7 @@ index 5189b18..c5a5b77 100644
          fn = self._mydir + '/' + attr
          if attr in self._read_cached_data:
              del self._read_cached_data[attr]
-@@ -776,18 +808,20 @@ class RPMDBAdditionalDataPackage(object):
+@@ -776,18 +807,20 @@ class RPMDBAdditionalDataPackage(object):
          else:
              object.__delattr__(self, attr)
  
@@ -8118,7 +8204,7 @@ index 5189b18..c5a5b77 100644
          try:
              os.rmdir(self._mydir)
 diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
-index 7d87e0b..96ed13c 100644
+index 7d87e0b..a77a4c8 100644
 --- a/yum/sqlitesack.py
 +++ b/yum/sqlitesack.py
 @@ -60,6 +60,52 @@ def catchSqliteException(func):
@@ -8213,16 +8299,18 @@ index 7d87e0b..96ed13c 100644
      # Remove a package
      # Because we don't want to remove a package from the database we just
      # add it to the exclude list
-@@ -383,7 +437,7 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
+@@ -383,7 +437,9 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
          if not self.excludes.has_key(obj.repo):
              self.excludes[obj.repo] = {}
          self.excludes[obj.repo][obj.pkgId] = 1
 -        self._excludes.add( (obj.repo, obj.pkgKey) )
++        if (obj.repo, obj.pkgKey) in self._exclude_whitelist:
++            self._exclude_whitelist.discard((obj.repo, obj.pkgKey))
 +        self._delPackageRK(obj.repo, obj.pkgKey)
  
      def _delAllPackages(self, repo):
          """ Exclude all packages from the repo. """
-@@ -408,36 +462,170 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
+@@ -408,36 +464,170 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
  
          return (repo, pkgKey) in self._excludes
  
@@ -8406,7 +8494,7 @@ index 7d87e0b..96ed13c 100644
              return None
          if data['pkgKey'] not in self._key2pkg.get(repo, {}):
              po = self.pc(repo, data)
-@@ -481,8 +669,6 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
+@@ -481,8 +671,6 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
          """ Takes a cursor and maps the pkgKey rows into a list of packages. """
          if pkgs is None: pkgs = []
          for ob in cur:
@@ -8415,7 +8503,7 @@ index 7d87e0b..96ed13c 100644
              if have_data:
                  pkg = self._packageByKeyData(repo, ob['pkgKey'], ob)
              else:
-@@ -676,8 +862,6 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
+@@ -676,8 +864,6 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
              cur = cache.cursor()
              executeSQL(cur, totalstring)
              for ob in cur:
@@ -8424,7 +8512,7 @@ index 7d87e0b..96ed13c 100644
                  pkg = self._packageByKey(rep, ob['pkgKey'])
                  if pkg is None:
                      continue
-@@ -704,16 +888,12 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
+@@ -704,16 +890,12 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
                  obsoletes.flags as oflags\
                  from obsoletes,packages where obsoletes.pkgKey = packages.pkgKey")
              for ob in cur:
@@ -8444,7 +8532,7 @@ index 7d87e0b..96ed13c 100644
                  (n,f,e,v,r) = ( _share_data(ob['oname']),
                                  _share_data(ob['oflags']),
                                  _share_data(ob['oepoch']),
-@@ -817,8 +997,6 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
+@@ -817,8 +999,6 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
                      if rpmUtils.miscutils.rangeCompare(req, val):
                          tmp.setdefault(pkgkey, []).append(val)
                  for pkgKey, hits in tmp.iteritems():
@@ -8453,7 +8541,7 @@ index 7d87e0b..96ed13c 100644
                      pkg = self._packageByKey(rep, pkgKey)
                      if pkg is None:
                          continue
-@@ -840,8 +1018,6 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
+@@ -840,8 +1020,6 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
                  if rpmUtils.miscutils.rangeCompare(req, val):
                      tmp.setdefault(x['pkgKey'], []).append(val)
              for pkgKey, hits in tmp.iteritems():
@@ -8462,7 +8550,7 @@ index 7d87e0b..96ed13c 100644
                  pkg = self._packageByKey(rep, pkgKey)
                  if pkg is None:
                      continue
-@@ -869,8 +1045,6 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
+@@ -869,8 +1047,6 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
              cur = cache.cursor()
              executeSQL(cur, "select DISTINCT pkgKey from files where name = ?", (name,))
              for ob in cur:
@@ -8471,7 +8559,7 @@ index 7d87e0b..96ed13c 100644
                  pkg = self._packageByKey(rep, ob['pkgKey'])
                  if pkg is None:
                      continue
-@@ -1184,11 +1358,15 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
+@@ -1184,11 +1360,15 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
                  if pat_sqls:
                      qsql = _FULL_PARSE_QUERY_BEG + " OR ".join(pat_sqls)
                  executeSQL(cur, qsql, pat_data)
@@ -8491,7 +8579,7 @@ index 7d87e0b..96ed13c 100644
                          continue
                      returnList.append(po)
          if not patterns:
-@@ -1203,16 +1381,23 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
+@@ -1203,16 +1383,23 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
          if self._skip_all():
              return []
  
@@ -8855,7 +8943,7 @@ index 94e352c..028d821 100644
  
  def getMirrorList(mirrorlist, pdict = None):
 diff --git a/yumcommands.py b/yumcommands.py
-index 706d908..6a0e243 100644
+index 706d908..edaddfd 100644
 --- a/yumcommands.py
 +++ b/yumcommands.py
 @@ -531,7 +531,6 @@ class CleanCommand(YumCommand):
@@ -8877,7 +8965,7 @@ index 706d908..6a0e243 100644
                      if repo.metalink:
                          out += [base.fmtKeyValFill(_("Repo-metalink: "),
                                                     repo.metalink)]
-@@ -1043,3 +1046,70 @@ class DowngradeCommand(YumCommand):
+@@ -1043,3 +1046,74 @@ class DowngradeCommand(YumCommand):
      def needTs(self, base, basecmd, extcmds):
          return False
          
@@ -8900,12 +8988,16 @@ index 706d908..6a0e243 100644
 +        def _append_repos(cols, repo_data):
 +            for repoid in sorted(repo_data):
 +                cur = repo_data[repoid]
-+                if None in cur and len(cur) != 2:
-+                    cols.append(("    %s" % repoid, str(cur[None])))
++                ncols = []
++                last_rev = None
 +                for rev in sorted(cur):
 +                    if rev is None:
 +                        continue
-+                    cols.append(("    %s/%s" % (repoid, rev), str(cur[rev])))
++                    last_rev = cur[rev]
++                    ncols.append(("    %s/%s" % (repoid, rev), str(cur[rev])))
++                if None in cur and (not last_rev or cur[None] != last_rev):
++                    cols.append(("    %s" % repoid, str(cur[None])))
++                cols.extend(ncols)
 +
 +        rel = base.yumvar['releasever']
 +        ba  = base.yumvar['basearch']


Index: yum.spec
===================================================================
RCS file: /cvs/pkgs/rpms/yum/devel/yum.spec,v
retrieving revision 1.261
retrieving revision 1.262
diff -u -p -r1.261 -r1.262
--- yum.spec	19 Jun 2009 16:03:04 -0000	1.261
+++ yum.spec	21 Jun 2009 06:10:35 -0000	1.262
@@ -3,7 +3,7 @@
 Summary: RPM installer/updater
 Name: yum
 Version: 3.2.23
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 Source0: http://yum.baseurl.org/download/3.2/%{name}-%{version}.tar.gz
@@ -104,6 +104,11 @@ rm -rf $RPM_BUILD_ROOT
 %dir /usr/lib/yum-plugins
 
 %changelog
+* Sun Jun 21 2009 James Antill <james at fedoraproject.org> - 3.2.23-6
+- Update to latest head:
+- Unbreak delPackage() excludes.
+- Other fixes/etc.
+
 * Fri Jun 19 2009 James Antill <james at fedoraproject.org> - 3.2.23-5
 - Actually apply the HEAD patch included yesterday :).
 




More information about the fedora-extras-commits mailing list