diff --git a/yum/__init__.py b/yum/__init__.py
index effbb64..b5009c0 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -612,8 +612,8 @@ class YumBase(depsolve.Depsolve):
costs = {}
for r in self.repos.listEnabled():
costs[r.cost] = 1
-
- if len(costs.keys()) == 1: # if all of our costs are the same then return
+
+ if len(costs.keys()) <= 1: # if all of our costs are the same then return
return
def _sort_by_cost(a, b):
diff --git a/yum/rpmtrans.py b/yum/rpmtrans.py
index fe293d1..a3cb203 100644
--- a/yum/rpmtrans.py
+++ b/yum/rpmtrans.py
@@ -108,8 +108,12 @@ class RPMBaseCallback:
print >> sys.stderr, msg
def filelog(self, package, action):
- # check package object type - if it is a string - just output it
- msg = '%s: %s' % (self.fileaction[action], package)
+ # If the action is not in the fileaction list then dump it as a string
+ # hurky but, sadly, not much else
+ if self.fileaction.has_key(action):
+ msg = '%s: %s' % (self.fileaction[action], package)
+ else:
+ msg = '%s: %s' % (package, action)
self.logger.info(msg)
@@ -220,7 +224,7 @@ class RPMTransaction:
# some curveballs
if len(self._te_tuples) == 0:
msg = 'extra callback for package %s in state %d' % (package, action)
- self.display.filelog(msg)
+ self.display.filelog(package, msg)
return
(t,e,n,v,r,a) = self._te_tuples[0] # what we should be on
@@ -229,10 +233,10 @@ class RPMTransaction:
msg = 'ts_done state is %s %s should be %s %s' % (package, action, t, n)
if action in TS_REMOVE_STATES:
if t != 'erase':
- self.display.filelog(msg)
+ self.display.filelog(package, msg)
if action in TS_INSTALL_STATES:
if t != 'install':
- self.display.filelog(msg)
+ self.display.filelog(package, msg)
# check the pkg name out to make sure it matches
if type(package) in types.StringTypes:
@@ -242,7 +246,7 @@ class RPMTransaction:
if n != name:
msg = 'ts_done name in te is %s should be %s' % (n, package)
- self.display.filelog(msg)
+ self.display.filelog(package, msg)
# 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[name]:
+ 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/depsolve.py b/yum/depsolve.py
index d3a8575..3f0f962 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -300,6 +300,13 @@ class Depsolve(object):
# check for mode by just the name
thismode = self.tsInfo.getMode(name=i_n)
+ # if this package is being obsoleted, it's just like if it's
+ # being upgraded as far as checking for other providers
+ if thismode is None:
+ if filter(lambda x: x.obsoleted_by,
+ self.tsInfo.matchNaevr(i_n, i_a, i_e, i_v, i_r)):
+ thismode = 'u'
+
if thismode is not None:
needmode = thismode