From 0da70145ec6d7dddc23f5b9dcc433246d9d3af9e Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Apr 15 2008 13:12:08 +0000 Subject: fixes for f9 GA --- diff --git a/yum-big-head.patch b/yum-big-head.patch index 57b23d9..151cba9 100644 --- a/yum-big-head.patch +++ b/yum-big-head.patch @@ -112,7 +112,7 @@ index 741fcc7..0454c9a 100644 help=_("answer yes for all questions")) self.add_option("--version", action="store_true", diff --git a/output.py b/output.py -index 532a06e..3ef850d 100644 +index 532a06e..cc80301 100644 --- a/output.py +++ b/output.py @@ -23,13 +23,13 @@ import logging @@ -162,7 +162,33 @@ index 532a06e..3ef850d 100644 except: choice = '' choice = choice.lower() -@@ -747,7 +749,7 @@ class YumCliRPMCallBack(RPMBaseCallback): +@@ -370,21 +372,22 @@ class YumOutput: + print _(' Description: %s') % group.description.encode("UTF-8") + if len(group.mandatory_packages) > 0: + print _(' Mandatory Packages:') +- for item in group.mandatory_packages: ++ for item in sorted(group.mandatory_packages): + print ' %s' % item + + if len(group.default_packages) > 0: + print _(' Default Packages:') +- for item in group.default_packages: ++ for item in sorted(group.default_packages): + print ' %s' % item + + if len(group.optional_packages) > 0: + print _(' Optional Packages:') +- for item in group.optional_packages: ++ for item in sorted(group.optional_packages): + print ' %s' % item + + if len(group.conditional_packages) > 0: + print _(' Conditional Packages:') ++ # FIXME: Why is this different? + for item, cond in group.conditional_packages.iteritems(): + print ' %s' % (item,) + +@@ -747,7 +750,7 @@ class YumCliRPMCallBack(RPMBaseCallback): fmt = self._makefmt(percent, ts_current, ts_total) msg = fmt % (process, pkgname) if msg != self.lastmsg: @@ -171,7 +197,7 @@ index 532a06e..3ef850d 100644 sys.stdout.flush() self.lastmsg = msg if te_current == te_total: -@@ -755,7 +757,7 @@ class YumCliRPMCallBack(RPMBaseCallback): +@@ -755,7 +758,7 @@ class YumCliRPMCallBack(RPMBaseCallback): def scriptout(self, package, msgs): if msgs: @@ -8917,7 +8943,7 @@ index 9f5f4a1..82534cf 100644 import yum.plugins as plugins diff --git a/yum/__init__.py b/yum/__init__.py -index 270f79f..7bf6ff3 100644 +index 270f79f..a4b9dd1 100644 --- a/yum/__init__.py +++ b/yum/__init__.py @@ -63,7 +63,7 @@ warnings.simplefilter("ignore", Errors.YumFutureDeprecationWarning) @@ -8940,7 +8966,7 @@ index 270f79f..7bf6ff3 100644 if debuglevel != None: startupconf.debuglevel = debuglevel -@@ -759,11 +761,19 @@ class YumBase(depsolve.Depsolve): +@@ -759,11 +761,30 @@ class YumBase(depsolve.Depsolve): def runTransaction(self, cb): """takes an rpm callback object, performs the transaction""" @@ -8955,13 +8981,34 @@ index 270f79f..7bf6ff3 100644 self.plugins.run('pretrans') errors = self.ts.run(cb.callback, '') - if errors: +- if errors: - errstring = '\n'.join(errors) ++ # ts.run() exit codes are, hmm, "creative": None means all ok, empty ++ # list means some errors happened in the transaction and non-empty ++ # list that there were errors preventing the ts from starting... ++ if errors is None: ++ pass ++ elif len(errors) == 0: ++ errstring = _('Warning: errors occurred during transaction.') ++ raise Errors.YumBaseError, errstring ++ else: ++ errstring = '\n'.join(map(_tup2str, errors)) ++ raise Errors.YumBaseError, errstring ++ + errstring = '\n'.join(map(_tup2str, errors)) raise Errors.YumBaseError, errstring if not self.conf.keepcache: -@@ -2619,7 +2629,7 @@ class YumBase(depsolve.Depsolve): +@@ -2206,6 +2227,8 @@ class YumBase(depsolve.Depsolve): + if thispkgobsdict.has_key(po.pkgtup): + obsoleting = thispkgobsdict[po.pkgtup][0] + obsoleting_pkg = self.getPackageObject(obsoleting) ++ self.verbose_logger.warning(_('Package %s is obsoleted by %s, trying to install %s instead'), ++ po.name, obsoleting_pkg.name, obsoleting_pkg) + self.install(po=obsoleting_pkg) + continue + +@@ -2619,7 +2642,7 @@ class YumBase(depsolve.Depsolve): rawkey = urlgrabber.urlread(keyurl, limit=9999) except urlgrabber.grabber.URLGrabError, e: raise Errors.YumBaseError(_('GPG key retrieval failed: ') + @@ -9032,7 +9079,7 @@ index f735edd..84c4882 100644 + import __builtin__ + __builtin__.__dict__['_'] = dummy_wrapper diff --git a/yum/misc.py b/yum/misc.py -index 44f85d4..a7090c9 100644 +index 44f85d4..d710ad1 100644 --- a/yum/misc.py +++ b/yum/misc.py @@ -20,11 +20,29 @@ import gpgme @@ -9055,7 +9102,7 @@ index 44f85d4..a7090c9 100644 + # hahahah, of course the above means that: + # hash(('a', 'b')) == hash((u'a', u'b')) + # ...which we have in deptuples, so just screw sharing those atm. -+ if type(value) == type(tuple): ++ if type(value) == types.TupleType: + return value + return store.setdefault(value, value) + @@ -9067,7 +9114,18 @@ index 44f85d4..a7090c9 100644 _re_compiled_glob_match = None def re_glob(s): -@@ -515,11 +533,26 @@ def find_ts_remaining(timestamp, yumlibpath='/var/lib/yum'): +@@ -440,10 +458,6 @@ def get_running_kernel_version_release(ts): + if ver.endswith(s): + reduced = ver.replace(s, "") + +- if reduced.find("-") != -1: +- (v, r) = reduced.split("-", 1) +- return (v, r) +- + # we've got nothing so far, so... we glob for the file that MIGHT have + # this kernels and then look up the file in our rpmdb + fns = glob.glob('/boot/vmlinuz*%s*' % ver) +@@ -515,11 +529,26 @@ def find_ts_remaining(timestamp, yumlibpath='/var/lib/yum'): return to_complete_items diff --git a/yum.spec b/yum.spec index 1a53d5e..59c1a72 100644 --- a/yum.spec +++ b/yum.spec @@ -3,7 +3,7 @@ Summary: RPM installer/updater Name: yum Version: 3.2.14 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://linux.duke.edu/projects/yum/download/3.2/%{name}-%{version}.tar.gz @@ -105,6 +105,9 @@ rm -rf $RPM_BUILD_ROOT %dir /usr/lib/yum-plugins %changelog +* Tue Apr 15 2008 Seth Vidal 3.2.14-8 +- after many tries - this one fixes translations AND pungi + * Thu Apr 10 2008 Seth Vidal 3.2.14-5 - once more, with feeling