diff --git a/yum-HEAD.patch b/yum-HEAD.patch index 51c02fe..83563c2 100644 --- a/yum-HEAD.patch +++ b/yum-HEAD.patch @@ -260,7 +260,7 @@ index 415f84b..40148a6 100644 Specifies a URL to a file containing a list of baseurls. This can be used instead of or with the \fBbaseurl\fR option. Substitution variables, described diff --git a/output.py b/output.py -index cdfc46d..cb9d1b9 100644 +index cdfc46d..340318e 100644 --- a/output.py +++ b/output.py @@ -255,17 +255,86 @@ class YumOutput: @@ -641,7 +641,74 @@ index cdfc46d..cb9d1b9 100644 out = out + summary return out -@@ -875,14 +937,15 @@ Remove %5.5s Package(s) +@@ -787,6 +849,35 @@ Remove %5.5s Package(s) + + self.tsInfo.makelists() + ++ # Works a bit like calcColumns, but we never overflow a column we just ++ # have a dynamic number of columns. ++ def _fits_in_cols(msgs, num): ++ """ Work out how many columns we can use to display stuff, in ++ the post trans output. """ ++ if len(msgs) < num: ++ return [] ++ ++ left = self.term.columns - ((num - 1) + 2) ++ if left <= 0: ++ return [] ++ ++ col_lens = [0] * num ++ col = 0 ++ for msg in msgs: ++ if len(msg) > col_lens[col]: ++ diff = (len(msg) - col_lens[col]) ++ if left <= diff: ++ return [] ++ left -= diff ++ col_lens[col] = len(msg) ++ col += 1 ++ col %= len(col_lens) ++ ++ for col in range(len(col_lens)): ++ col_lens[col] += left / num ++ col_lens[col] *= -1 ++ return col_lens ++ + for (action, pkglist) in [(_('Removed'), self.tsInfo.removed), + (_('Dependency Removed'), self.tsInfo.depremoved), + (_('Installed'), self.tsInfo.installed), +@@ -794,14 +885,25 @@ Remove %5.5s Package(s) + (_('Updated'), self.tsInfo.updated), + (_('Dependency Updated'), self.tsInfo.depupdated), + (_('Replaced'), self.tsInfo.obsoleted)]: +- ++ msgs = [] + if len(pkglist) > 0: +- out += '\n%s:' % action ++ out += '\n%s:\n' % action + for txmbr in pkglist: + (n,a,e,v,r) = txmbr.pkgtup +- msg = " %s.%s %s:%s-%s" % (n,a,e,v,r) +- out += msg +- ++ msg = "%s.%s %s:%s-%s" % (n,a,e,v,r) ++ msgs.append(msg) ++ for num in (8, 7, 6, 5, 4, 3, 2): ++ cols = _fits_in_cols(msgs, num) ++ if cols: ++ break ++ if not cols: ++ cols = [-(self.term.columns - 2)] ++ while msgs: ++ current_msgs = msgs[:len(cols)] ++ out += ' ' ++ out += self.fmtColumns(zip(current_msgs, cols), end=u'\n') ++ msgs = msgs[len(cols):] ++ + return out + + def setupProgressCallbacks(self): +@@ -875,14 +977,15 @@ Remove %5.5s Package(s) return tl = urlgrabber.progress.TerminalLine(8) @@ -659,7 +726,7 @@ index cdfc46d..cb9d1b9 100644 class DepSolveProgressCallBack: -@@ -978,7 +1041,7 @@ class YumCliRPMCallBack(RPMBaseCallback): +@@ -978,7 +1081,7 @@ class YumCliRPMCallBack(RPMBaseCallback): RPMBaseCallback.__init__(self) self.lastmsg = None self.lastpackage = None # name of last package we looked at @@ -2955,7 +3022,7 @@ index 9435e0d..0eb35e3 100644 BuildArchitectures: noarch BuildRequires: python diff --git a/yum/__init__.py b/yum/__init__.py -index 4fa47eb..6580daa 100644 +index 4fa47eb..73567a9 100644 --- a/yum/__init__.py +++ b/yum/__init__.py @@ -635,6 +635,12 @@ class YumBase(depsolve.Depsolve): @@ -3009,13 +3076,11 @@ index 4fa47eb..6580daa 100644 self.verbose_logger.debug(_('Keeping included package %s'), po) continue else: -@@ -1336,7 +1342,8 @@ class YumBase(depsolve.Depsolve): - return self._cleanFiles(exts, 'cachedir', 'sqlite') +@@ -1337,6 +1343,7 @@ class YumBase(depsolve.Depsolve): def cleanMetadata(self): -- exts = ['xml.gz', 'xml', 'cachecookie', 'mirrorlist.txt'] -+ exts = ['xml.gz', 'xml', 'cachecookie', 'mirrorlist.txt', -+ 'metalink.xml'] + exts = ['xml.gz', 'xml', 'cachecookie', 'mirrorlist.txt'] ++ # Metalink is also here, but is a *.xml file return self._cleanFiles(exts, 'cachedir', 'metadata') def cleanExpireCache(self): @@ -3652,10 +3717,10 @@ index b9cc387..801fc0f 100644 if mylang == (None, None): # odd :) mylang = 'C' diff --git a/yum/packages.py b/yum/packages.py -index 9cb5c19..c0373e4 100644 +index 9cb5c19..4e3bbd5 100644 --- a/yum/packages.py +++ b/yum/packages.py -@@ -932,8 +932,8 @@ class YumAvailablePackage(PackageObject, RpmBase): +@@ -932,33 +932,32 @@ class YumAvailablePackage(PackageObject, RpmBase): if clog_limit and clog_count >= clog_limit: break clog_count += 1 @@ -3666,22 +3731,39 @@ index 9cb5c19..c0373e4 100644 misc.to_xml(content)) return msg -@@ -956,8 +956,12 @@ class YumAvailablePackage(PackageObject, RpmBase): + def xml_dump_primary_metadata(self): + msg = """\n""" +- msg += self._dump_base_items() +- msg += self._dump_format_items() ++ msg += misc.to_unicode(self._dump_base_items()) ++ msg += misc.to_unicode(self._dump_format_items()) + msg += """\n""" +- return msg ++ return misc.to_utf8(msg) + + def xml_dump_filelists_metadata(self): + msg = """\n + \n""" % (self.checksum, self.name, + self.arch, self.epoch, self.ver, self.rel) +- msg += self._dump_files() ++ msg += misc.to_unicode(self._dump_files()) + msg += "\n" +- return msg ++ return misc.to_utf8(msg) + + def xml_dump_other_metadata(self, clog_limit=0): msg = """\n \n""" % (self.checksum, self.name, self.arch, self.epoch, self.ver, self.rel) - msg += self._dump_changelog(clog_limit) - msg += "\n\n" -+ clogs = str(self._dump_changelog(clog_limit)) -+ #print type(clogs) -+ mystr = "%s\n\n" -+ #print type(mystr) -+ foo = "%s\n\n" % clogs -+ msg += "%s\n\n" % self._dump_changelog(clog_limit) - return msg +- return msg ++ msg += "%s\n\n" % misc.to_unicode(self._dump_changelog(clog_limit)) ++ return misc.to_utf8(msg) + -@@ -1104,9 +1108,9 @@ class YumHeaderPackage(YumAvailablePackage): +@@ -1104,9 +1103,9 @@ class YumHeaderPackage(YumAvailablePackage): # then create a _loadChangelog() method to put them into the # self._changelog attr if len(self.hdr['changelogname']) > 0: diff --git a/yum.spec b/yum.spec index 7efe3ea..7bd40e9 100644 --- a/yum.spec +++ b/yum.spec @@ -3,7 +3,7 @@ Summary: RPM installer/updater Name: yum Version: 3.2.19 -Release: 4%{?dist} +Release: 5%{?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 +* Wed Oct 15 2008 Seth Vidal - 3.2.19-5 +- rebase against 3.2.X HEAD + * Tue Oct 14 2008 Seth Vidal - 3.2.19-4 - pull patch from git to bring us up to current(ish)