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)