|
Seth Vidal |
cbddb99 |
diff --git a/yum/__init__.py b/yum/__init__.py
|
|
Seth Vidal |
cbddb99 |
index effbb64..b5009c0 100644
|
|
Seth Vidal |
cbddb99 |
--- a/yum/__init__.py
|
|
Seth Vidal |
cbddb99 |
+++ b/yum/__init__.py
|
|
Seth Vidal |
cbddb99 |
@@ -612,8 +612,8 @@ class YumBase(depsolve.Depsolve):
|
|
Seth Vidal |
cbddb99 |
costs = {}
|
|
Seth Vidal |
cbddb99 |
for r in self.repos.listEnabled():
|
|
Seth Vidal |
cbddb99 |
costs[r.cost] = 1
|
|
Seth Vidal |
cbddb99 |
-
|
|
Seth Vidal |
cbddb99 |
- if len(costs.keys()) == 1: # if all of our costs are the same then return
|
|
|
db2e522 |
+
|
|
Seth Vidal |
cbddb99 |
+ if len(costs.keys()) <= 1: # if all of our costs are the same then return
|
|
Seth Vidal |
cbddb99 |
return
|
|
|
db2e522 |
|
|
Seth Vidal |
cbddb99 |
def _sort_by_cost(a, b):
|
|
Seth Vidal |
cbddb99 |
diff --git a/yum/rpmtrans.py b/yum/rpmtrans.py
|
|
Seth Vidal |
cbddb99 |
index fe293d1..a3cb203 100644
|
|
Seth Vidal |
cbddb99 |
--- a/yum/rpmtrans.py
|
|
Seth Vidal |
cbddb99 |
+++ b/yum/rpmtrans.py
|
|
Seth Vidal |
cbddb99 |
@@ -108,8 +108,12 @@ class RPMBaseCallback:
|
|
Seth Vidal |
cbddb99 |
print >> sys.stderr, msg
|
|
|
db2e522 |
|
|
Seth Vidal |
cbddb99 |
def filelog(self, package, action):
|
|
Seth Vidal |
cbddb99 |
- # check package object type - if it is a string - just output it
|
|
Seth Vidal |
cbddb99 |
- msg = '%s: %s' % (self.fileaction[action], package)
|
|
Seth Vidal |
cbddb99 |
+ # If the action is not in the fileaction list then dump it as a string
|
|
Seth Vidal |
cbddb99 |
+ # hurky but, sadly, not much else
|
|
Seth Vidal |
cbddb99 |
+ if self.fileaction.has_key(action):
|
|
Seth Vidal |
cbddb99 |
+ msg = '%s: %s' % (self.fileaction[action], package)
|
|
|
db2e522 |
+ else:
|
|
Seth Vidal |
cbddb99 |
+ msg = '%s: %s' % (package, action)
|
|
Seth Vidal |
cbddb99 |
self.logger.info(msg)
|
|
Seth Vidal |
cbddb99 |
|
|
|
db2e522 |
|
|
Seth Vidal |
cbddb99 |
@@ -220,7 +224,7 @@ class RPMTransaction:
|
|
Seth Vidal |
cbddb99 |
# some curveballs
|
|
Seth Vidal |
cbddb99 |
if len(self._te_tuples) == 0:
|
|
Seth Vidal |
cbddb99 |
msg = 'extra callback for package %s in state %d' % (package, action)
|
|
Seth Vidal |
cbddb99 |
- self.display.filelog(msg)
|
|
Seth Vidal |
cbddb99 |
+ self.display.filelog(package, msg)
|
|
Seth Vidal |
cbddb99 |
return
|
|
|
db2e522 |
|
|
Seth Vidal |
cbddb99 |
(t,e,n,v,r,a) = self._te_tuples[0] # what we should be on
|
|
Seth Vidal |
cbddb99 |
@@ -229,10 +233,10 @@ class RPMTransaction:
|
|
Seth Vidal |
cbddb99 |
msg = 'ts_done state is %s %s should be %s %s' % (package, action, t, n)
|
|
Seth Vidal |
cbddb99 |
if action in TS_REMOVE_STATES:
|
|
Seth Vidal |
cbddb99 |
if t != 'erase':
|
|
Seth Vidal |
cbddb99 |
- self.display.filelog(msg)
|
|
Seth Vidal |
cbddb99 |
+ self.display.filelog(package, msg)
|
|
Seth Vidal |
cbddb99 |
if action in TS_INSTALL_STATES:
|
|
Seth Vidal |
cbddb99 |
if t != 'install':
|
|
Seth Vidal |
cbddb99 |
- self.display.filelog(msg)
|
|
Seth Vidal |
cbddb99 |
+ self.display.filelog(package, msg)
|
|
Seth Vidal |
cbddb99 |
|
|
Seth Vidal |
cbddb99 |
# check the pkg name out to make sure it matches
|
|
Seth Vidal |
cbddb99 |
if type(package) in types.StringTypes:
|
|
Seth Vidal |
cbddb99 |
@@ -242,7 +246,7 @@ class RPMTransaction:
|
|
Seth Vidal |
cbddb99 |
|
|
Seth Vidal |
cbddb99 |
if n != name:
|
|
Seth Vidal |
cbddb99 |
msg = 'ts_done name in te is %s should be %s' % (n, package)
|
|
Seth Vidal |
cbddb99 |
- self.display.filelog(msg)
|
|
Seth Vidal |
cbddb99 |
+ self.display.filelog(package, msg)
|
|
|
db2e522 |
|
|
Seth Vidal |
cbddb99 |
# hope springs eternal that this isn't wrong
|
|
Seth Vidal |
cbddb99 |
msg = '%s %s:%s-%s-%s.%s\n' % (t,e,n,v,r,a)
|
|
|
92afca1 |
diff --git a/yum/repos.py b/yum/repos.py
|
|
|
92afca1 |
index 3b1214f..20a6a33 100644
|
|
|
92afca1 |
--- a/yum/repos.py
|
|
|
92afca1 |
+++ b/yum/repos.py
|
|
|
92afca1 |
@@ -51,7 +51,7 @@ class RepoStorage:
|
|
|
92afca1 |
repos = self.findRepos(thisrepo)
|
|
|
92afca1 |
|
|
|
92afca1 |
if len(repos) < 1:
|
|
|
92afca1 |
- self.logger.critical('No Repositories Available to Set Up')
|
|
|
92afca1 |
+ self.logger.debug('No Repositories Available to Set Up')
|
|
|
92afca1 |
|
|
|
92afca1 |
num = 1
|
|
|
92afca1 |
for repo in repos:
|
|
|
92afca1 |
diff --git a/rpmUtils/updates.py b/rpmUtils/updates.py
|
|
|
92afca1 |
index 5a98fde..116a1d4 100644
|
|
|
92afca1 |
--- a/rpmUtils/updates.py
|
|
|
92afca1 |
+++ b/rpmUtils/updates.py
|
|
|
92afca1 |
@@ -199,6 +199,12 @@ class Updates:
|
|
|
92afca1 |
# look through all the obsoleting packages look for multiple archs per name
|
|
|
92afca1 |
# if you find it look for the packages they obsolete
|
|
|
92afca1 |
#
|
|
|
92afca1 |
+ obs_arches = {}
|
|
|
92afca1 |
+ for (n, a, e, v, r) in self.rawobsoletes.keys():
|
|
|
92afca1 |
+ if not obs_arches.has_key(n):
|
|
|
92afca1 |
+ obs_arches[n] = []
|
|
|
92afca1 |
+ obs_arches[n].append(a)
|
|
|
92afca1 |
+
|
|
|
92afca1 |
for pkgtup in self.rawobsoletes.keys():
|
|
|
92afca1 |
(name, arch, epoch, ver, rel) = pkgtup
|
|
|
92afca1 |
for (obs_n, flag, (obs_e, obs_v, obs_r)) in self.rawobsoletes[(pkgtup)]:
|
|
|
92afca1 |
@@ -214,6 +220,8 @@ class Updates:
|
|
|
92afca1 |
if self.returnNewest((pkgver, installedver)) == installedver:
|
|
|
92afca1 |
willInstall = 0
|
|
|
92afca1 |
break
|
|
|
bf0b77e |
+ if rpm_a != arch and rpm_a in obs_arches[name]:
|
|
|
92afca1 |
+ willInstall = 0
|
|
|
92afca1 |
if willInstall:
|
|
|
92afca1 |
if not obsdict.has_key(pkgtup):
|
|
|
92afca1 |
obsdict[pkgtup] = []
|
|
|
92afca1 |
diff --git a/yum/__init__.py b/yum/__init__.py
|
|
|
92afca1 |
index b5009c0..372e0ec 100644
|
|
|
92afca1 |
--- a/yum/__init__.py
|
|
|
92afca1 |
+++ b/yum/__init__.py
|
|
|
92afca1 |
@@ -2155,6 +2155,7 @@ class YumBase(depsolve.Depsolve):
|
|
|
92afca1 |
hexkeyid = misc.keyIdToRPMVer(keyid).upper()
|
|
|
92afca1 |
timestamp = keyinfo['timestamp']
|
|
|
92afca1 |
userid = keyinfo['userid']
|
|
|
92afca1 |
+ fingerprint = keyinfo['fingerprint']
|
|
|
92afca1 |
except ValueError, e:
|
|
|
92afca1 |
raise Errors.YumBaseError, \
|
|
|
92afca1 |
'GPG key parsing failed: ' + str(e)
|
|
|
92afca1 |
@@ -2172,7 +2173,8 @@ class YumBase(depsolve.Depsolve):
|
|
|
92afca1 |
rc = True
|
|
|
92afca1 |
elif fullaskcb:
|
|
|
92afca1 |
rc = fullaskcb({"po": po, "userid": userid,
|
|
|
92afca1 |
- "hexkeyid": hexkeyid, "keyurl": keyurl})
|
|
|
92afca1 |
+ "hexkeyid": hexkeyid, "keyurl": keyurl,
|
|
|
92afca1 |
+ "fingerprint": fingerprint, "timestamp": timestamp})
|
|
|
92afca1 |
elif askcb:
|
|
|
92afca1 |
rc = askcb(po, userid, hexkeyid)
|
|
|
92afca1 |
|
|
|
92afca1 |
diff --git a/yum/misc.py b/yum/misc.py
|
|
|
92afca1 |
index 4b78f4b..7c710e2 100644
|
|
|
92afca1 |
--- a/yum/misc.py
|
|
|
92afca1 |
+++ b/yum/misc.py
|
|
|
92afca1 |
@@ -204,6 +204,7 @@ def getgpgkeyinfo(rawkey):
|
|
|
92afca1 |
'userid': key.user_id,
|
|
|
92afca1 |
'keyid': struct.unpack('>Q', keyid_blob)[0],
|
|
|
92afca1 |
'timestamp': key.public_key.timestamp,
|
|
|
92afca1 |
+ 'fingerprint' : key.public_key.fingerprint,
|
|
|
92afca1 |
}
|
|
|
92afca1 |
|
|
|
92afca1 |
# Retrieve the timestamp from the matching signature packet
|
|
|
aa71b7d |
diff --git a/yum/depsolve.py b/yum/depsolve.py
|
|
|
aa71b7d |
index d3a8575..3f0f962 100644
|
|
|
aa71b7d |
--- a/yum/depsolve.py
|
|
|
aa71b7d |
+++ b/yum/depsolve.py
|
|
|
aa71b7d |
@@ -300,6 +300,13 @@ class Depsolve(object):
|
|
|
aa71b7d |
# check for mode by just the name
|
|
|
aa71b7d |
thismode = self.tsInfo.getMode(name=i_n)
|
|
|
aa71b7d |
|
|
|
aa71b7d |
+ # if this package is being obsoleted, it's just like if it's
|
|
|
aa71b7d |
+ # being upgraded as far as checking for other providers
|
|
|
aa71b7d |
+ if thismode is None:
|
|
|
aa71b7d |
+ if filter(lambda x: x.obsoleted_by,
|
|
|
aa71b7d |
+ self.tsInfo.matchNaevr(i_n, i_a, i_e, i_v, i_r)):
|
|
|
aa71b7d |
+ thismode = 'u'
|
|
|
aa71b7d |
+
|
|
|
aa71b7d |
if thismode is not None:
|
|
|
aa71b7d |
needmode = thismode
|
|
|
aa71b7d |
|