From 92afca1766813035b94ebac24db08fdfef75dee4 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Oct 10 2007 15:51:42 +0000 Subject: - pull in upstream fixes for obsoletes to not pull in extra arches (#301661), expose key fingerprint in callback and to remove a debug message --- diff --git a/.cvsignore b/.cvsignore index 0ff7c48..8462665 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1 @@ -yum-3.2.5.tar.gz yum-3.2.6.tar.gz diff --git a/sources b/sources index 85c9fb3..7e67f28 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -f0899caf538ed864234cafbc77d211c1 yum-3.2.5.tar.gz c5c09c8ff59ca9bc48ef9ae4ae205a78 yum-3.2.6.tar.gz diff --git a/yum-misc-fixes.patch b/yum-misc-fixes.patch index 926743e..65cc4e0 100644 --- a/yum-misc-fixes.patch +++ b/yum-misc-fixes.patch @@ -63,3 +63,76 @@ index fe293d1..a3cb203 100644 # hope springs eternal that this isn't wrong msg = '%s %s:%s-%s-%s.%s\n' % (t,e,n,v,r,a) +diff --git a/yum/repos.py b/yum/repos.py +index 3b1214f..20a6a33 100644 +--- a/yum/repos.py ++++ b/yum/repos.py +@@ -51,7 +51,7 @@ class RepoStorage: + repos = self.findRepos(thisrepo) + + if len(repos) < 1: +- self.logger.critical('No Repositories Available to Set Up') ++ self.logger.debug('No Repositories Available to Set Up') + + num = 1 + for repo in repos: +diff --git a/rpmUtils/updates.py b/rpmUtils/updates.py +index 5a98fde..116a1d4 100644 +--- a/rpmUtils/updates.py ++++ b/rpmUtils/updates.py +@@ -199,6 +199,12 @@ class Updates: + # look through all the obsoleting packages look for multiple archs per name + # if you find it look for the packages they obsolete + # ++ obs_arches = {} ++ for (n, a, e, v, r) in self.rawobsoletes.keys(): ++ if not obs_arches.has_key(n): ++ obs_arches[n] = [] ++ obs_arches[n].append(a) ++ + for pkgtup in self.rawobsoletes.keys(): + (name, arch, epoch, ver, rel) = pkgtup + for (obs_n, flag, (obs_e, obs_v, obs_r)) in self.rawobsoletes[(pkgtup)]: +@@ -214,6 +220,8 @@ class Updates: + if self.returnNewest((pkgver, installedver)) == installedver: + willInstall = 0 + break ++ if rpm_a != arch and rpm_a in obs_arches[n]: ++ willInstall = 0 + if willInstall: + if not obsdict.has_key(pkgtup): + obsdict[pkgtup] = [] +diff --git a/yum/__init__.py b/yum/__init__.py +index b5009c0..372e0ec 100644 +--- a/yum/__init__.py ++++ b/yum/__init__.py +@@ -2155,6 +2155,7 @@ class YumBase(depsolve.Depsolve): + hexkeyid = misc.keyIdToRPMVer(keyid).upper() + timestamp = keyinfo['timestamp'] + userid = keyinfo['userid'] ++ fingerprint = keyinfo['fingerprint'] + except ValueError, e: + raise Errors.YumBaseError, \ + 'GPG key parsing failed: ' + str(e) +@@ -2172,7 +2173,8 @@ class YumBase(depsolve.Depsolve): + rc = True + elif fullaskcb: + rc = fullaskcb({"po": po, "userid": userid, +- "hexkeyid": hexkeyid, "keyurl": keyurl}) ++ "hexkeyid": hexkeyid, "keyurl": keyurl, ++ "fingerprint": fingerprint, "timestamp": timestamp}) + elif askcb: + rc = askcb(po, userid, hexkeyid) + +diff --git a/yum/misc.py b/yum/misc.py +index 4b78f4b..7c710e2 100644 +--- a/yum/misc.py ++++ b/yum/misc.py +@@ -204,6 +204,7 @@ def getgpgkeyinfo(rawkey): + 'userid': key.user_id, + 'keyid': struct.unpack('>Q', keyid_blob)[0], + 'timestamp': key.public_key.timestamp, ++ 'fingerprint' : key.public_key.fingerprint, + } + + # Retrieve the timestamp from the matching signature packet diff --git a/yum.spec b/yum.spec index 0190f55..e18fb71 100644 --- a/yum.spec +++ b/yum.spec @@ -3,7 +3,7 @@ Summary: RPM installer/updater Name: yum Version: 3.2.6 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://linux.duke.edu/projects/yum/download/3.2/%{name}-%{version}.tar.gz @@ -95,6 +95,10 @@ rm -rf $RPM_BUILD_ROOT %dir /usr/lib/yum-plugins %changelog +* Wed Oct 10 2007 Jeremy Katz - 3.2.6-3 +- pull in upstream fixes for obsoletes to not pull in extra arches (#301661), + expose key fingerprint in callback and to remove a debug message + * Mon Oct 8 2007 Seth Vidal 3.2.6-2 - fixes pre-3.2.7