diff --git a/yum-HEAD.patch b/yum-HEAD.patch index 8ccd1aa..0bab5dc 100644 --- a/yum-HEAD.patch +++ b/yum-HEAD.patch @@ -96,7 +96,7 @@ index 2f6154e..2e5a052 100644 diff --git a/cli.py b/cli.py old mode 100644 new mode 100755 -index 6056d38..b7511f1 +index 6056d38..ffc1741 --- a/cli.py +++ b/cli.py @@ -25,7 +25,7 @@ import sys @@ -808,13 +808,13 @@ index 6056d38..b7511f1 + """Print out a formatted list of dependencies for a list of + packages. This is a cli wrapper method for + :class:`yum.YumBase.findDeps`. - ++ + :param args: a list of names or wildcards specifying packages + that should have their dependenices printed + :return: (exit_code, [ errors ]) + + exit_code is:: -+ + + 0 = we're done, exit + 1 = we've errored, exit with error string + 2 = we've got work yet to do, onto the next stage @@ -846,7 +846,7 @@ index 6056d38..b7511f1 old_sdup = self.conf.showdupesfromrepos # For output, as searchPackageProvides() is always in showdups mode self.conf.showdupesfromrepos = True -@@ -1163,20 +1396,68 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1163,20 +1396,77 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return 0, [] def resolveDepCli(self, args): @@ -865,12 +865,15 @@ index 6056d38..b7511f1 + 1 = we've errored, exit with error string + 2 = we've got work yet to do, onto the next stage + """ ++ ++ not_found = set() for arg in args: try: + ipkg = self.returnInstalledPackageByDep(arg) + except yum.Errors.YumBaseError: + ipkg = None + else: ++ self.verbose_logger.info(" %s:", arg) + self.verbose_logger.info("%s %s" % (ipkg.envra, + ipkg.ui_from_repo)) + try: @@ -878,13 +881,19 @@ index 6056d38..b7511f1 except yum.Errors.YumBaseError: - self.logger.critical(_('No Package Found for %s'), arg) + if not ipkg: -+ self.logger.critical(_('No Package Found for %s'), arg) ++ not_found.add(arg) else: - msg = '%s:%s-%s-%s.%s' % (pkg.epoch, pkg.name, pkg.version, pkg.release, pkg.arch) - self.verbose_logger.info(msg) ++ if not ipkg: ++ self.verbose_logger.info(" %s:", arg) + if not pkg.verEQ(ipkg): + self.verbose_logger.info("%s %s" % (pkg.envra, + pkg.ui_from_repo)) ++ ++ if not_found: ++ self.logger.critical(_('Error: No Packages found for:\n %s'), ++ "\n ".join(sorted(not_found))) return 0, [] @@ -920,7 +929,7 @@ index 6056d38..b7511f1 hdrcode = pkgcode = xmlcode = dbcode = expccode = 0 pkgresults = hdrresults = xmlresults = dbresults = expcresults = [] msg = self.fmtKeyValFill(_('Cleaning repos: '), -@@ -1228,7 +1509,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1228,7 +1518,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return code, [] def returnGroupLists(self, userlist): @@ -940,7 +949,7 @@ index 6056d38..b7511f1 uservisible=1 if len(userlist) > 0: -@@ -1254,7 +1547,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1254,7 +1556,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): msg += ' (%s)' % group.groupid if group.langonly: msg += ' [%s]' % group.langonly @@ -949,7 +958,7 @@ index 6056d38..b7511f1 done = False for group in installed: -@@ -1283,7 +1576,20 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1283,7 +1585,20 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return 0, [_('Done')] def returnGroupSummary(self, userlist): @@ -970,7 +979,7 @@ index 6056d38..b7511f1 uservisible=1 if len(userlist) > 0: -@@ -1327,7 +1633,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1327,7 +1642,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return 0, [_('Done')] def returnGroupInfo(self, userlist): @@ -991,7 +1000,7 @@ index 6056d38..b7511f1 for strng in userlist: group_matched = False for group in self.comps.return_groups(strng): -@@ -1339,9 +1657,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1339,9 +1666,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return 0, [] @@ -1014,7 +1023,7 @@ index 6056d38..b7511f1 pkgs_used = [] for group_string in grouplist: -@@ -1351,7 +1679,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1351,7 +1688,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): try: @@ -1023,7 +1032,7 @@ index 6056d38..b7511f1 except yum.Errors.GroupsError: self.logger.critical(_('Warning: Group %s does not exist.'), group_string) continue -@@ -1368,8 +1696,18 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1368,8 +1705,18 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return 2, [P_('%d package to Install', '%d packages to Install', len(pkgs_used)) % len(pkgs_used)] def removeGroups(self, grouplist): @@ -1043,7 +1052,7 @@ index 6056d38..b7511f1 pkgs_used = [] for group_string in grouplist: try: -@@ -1389,7 +1727,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1389,7 +1736,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): def _promptWanted(self): # shortcut for the always-off/always-on options @@ -1052,7 +1061,7 @@ index 6056d38..b7511f1 return False if self.conf.alwaysprompt: return True -@@ -1400,7 +1738,6 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1400,7 +1747,6 @@ class YumBaseCli(yum.YumBase, output.YumOutput): # package wasn't explictly given on the command line for txmbr in self.tsInfo.getMembers(): if txmbr.isDep or \ @@ -1060,7 +1069,7 @@ index 6056d38..b7511f1 txmbr.name not in self.extcmds: return True -@@ -1408,11 +1745,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1408,11 +1754,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return False def usage(self): @@ -1074,7 +1083,7 @@ index 6056d38..b7511f1 sys.stdout.write(self.optparser.get_usage()) def _installable(self, pkg, ematch=False): -@@ -1468,9 +1805,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1468,9 +1814,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return False class YumOptionParser(OptionParser): @@ -1086,7 +1095,7 @@ index 6056d38..b7511f1 def __init__(self,base, **kwargs): # check if this is called with a utils=True/False parameter -@@ -1488,13 +1825,23 @@ class YumOptionParser(OptionParser): +@@ -1488,13 +1834,23 @@ class YumOptionParser(OptionParser): self._addYumBasicOptions() def error(self, msg): @@ -1112,7 +1121,7 @@ index 6056d38..b7511f1 try: args = _filtercmdline( ('--noplugins','--version','-q', '-v', "--quiet", "--verbose"), -@@ -1521,7 +1868,15 @@ class YumOptionParser(OptionParser): +@@ -1521,7 +1877,15 @@ class YumOptionParser(OptionParser): return ret def setupYumConfig(self, args=None): @@ -1129,7 +1138,7 @@ index 6056d38..b7511f1 if not args: (opts, cmds) = self.parse_args() else: -@@ -1536,13 +1891,14 @@ class YumOptionParser(OptionParser): +@@ -1536,13 +1900,14 @@ class YumOptionParser(OptionParser): # Handle remaining options if opts.assumeyes: @@ -1149,7 +1158,7 @@ index 6056d38..b7511f1 self.base.conf.cache = 1 if opts.obsoletes: -@@ -1610,10 +1966,6 @@ class YumOptionParser(OptionParser): +@@ -1610,10 +1975,6 @@ class YumOptionParser(OptionParser): self.base.usage() sys.exit(1) @@ -1160,7 +1169,7 @@ index 6056d38..b7511f1 # Disable all gpg key checking, if requested. if opts.nogpgcheck: # Altering the normal configs. doesn't work too well, esp. with -@@ -1640,6 +1992,14 @@ class YumOptionParser(OptionParser): +@@ -1640,6 +2001,14 @@ class YumOptionParser(OptionParser): sys.exit(1) def getRoot(self,opts): @@ -1175,7 +1184,7 @@ index 6056d38..b7511f1 self._checkAbsInstallRoot(opts) # If the conf file is inside the installroot - use that. # otherwise look for it in the normal root -@@ -1713,6 +2073,10 @@ class YumOptionParser(OptionParser): +@@ -1713,6 +2082,10 @@ class YumOptionParser(OptionParser): help=_("verbose operation")) group.add_option("-y", "--assumeyes", dest="assumeyes", action="store_true", help=_("answer yes for all questions")) @@ -2602,7 +2611,7 @@ index c60fa08..0000000 -ts run -exit diff --git a/etc/yum.bash b/etc/yum.bash -index f1e06e8..6d21e51 100644 +index f1e06e8..5945c6f 100644 --- a/etc/yum.bash +++ b/etc/yum.bash @@ -1,53 +1,17 @@ @@ -2740,7 +2749,7 @@ index f1e06e8..6d21e51 100644 for c in ${cmds[@]} check-rpmdb distribution-synchronization erase \ - groupupdate grouperase localinstall localupdate whatprovides ; do + group groupinfo groupinstall grouplist groupremove groupupdate \ -+ grouperase localinstall localupdate whatprovides ; do ++ grouperase install-na localinstall localupdate whatprovides ; do [[ ${words[i]} == $c ]] && cmd=$c && break done done @@ -2860,16 +2869,20 @@ index f1e06e8..6d21e51 100644 ;; esac return 0 -@@ -288,13 +285,15 @@ _yum() +@@ -288,13 +285,20 @@ _yum() ;; install) - _yum_binrpmfiles "$cur" -- _yum_list available "$cur" + if ! _yum_atgroups "$cur" ; then + _yum_binrpmfiles "$cur" + _yum_list available "$cur" + fi ++ return 0 ++ ;; ++ ++ install-na) + _yum_list available "$cur" return 0 ;; @@ -2879,7 +2892,7 @@ index f1e06e8..6d21e51 100644 COMPREPLY=( $( compgen -W 'all available updates installed extras obsoletes recent' -- "$cur" ) ) return 0 -@@ -306,24 +305,26 @@ _yum() +@@ -306,24 +310,26 @@ _yum() ;; repolist) @@ -2911,7 +2924,7 @@ index f1e06e8..6d21e51 100644 COMPREPLY=( $( compgen -W 'all installed available nogroups grouplist groupinfo' -- "$cur" ) ) return 0 -@@ -337,7 +338,11 @@ _yum() +@@ -337,7 +343,11 @@ _yum() $split && return 0 @@ -144686,7 +144699,7 @@ index 704a726..c970fec 100644 #, python-format msgid "Header cannot be opened or does not match %s, %s." diff --git a/rpmUtils/arch.py b/rpmUtils/arch.py -index 6082005..732f962 100644 +index 6082005..7d67907 100644 --- a/rpmUtils/arch.py +++ b/rpmUtils/arch.py @@ -2,6 +2,9 @@ @@ -144708,7 +144721,7 @@ index 6082005..732f962 100644 arches = { # ia32 -@@ -61,6 +66,10 @@ arches = { +@@ -61,6 +66,13 @@ arches = { "armv5tejl": "armv5tel", "armv5tel": "noarch", @@ -144716,10 +144729,13 @@ index 6082005..732f962 100644 + "armv7hnl": "armv7hl", + "armv7hl": "noarch", + ++ # arm64 ++ "arm64": "noarch", ++ # super-h "sh4a": "sh4", "sh4": "noarch", -@@ -231,6 +240,13 @@ def getCanonX86Arch(arch): +@@ -231,6 +243,13 @@ def getCanonX86Arch(arch): return arch @@ -144733,7 +144749,7 @@ index 6082005..732f962 100644 def getCanonPPCArch(arch): # FIXME: should I do better handling for mac, etc? if arch != "ppc64": -@@ -308,6 +324,8 @@ def getCanonArch(skipRpmPlatform = 0): +@@ -308,6 +327,8 @@ def getCanonArch(skipRpmPlatform = 0): if (len(arch) == 4 and arch[0] == "i" and arch[2:4] == "86"): return getCanonX86Arch(arch) @@ -144742,7 +144758,7 @@ index 6082005..732f962 100644 if arch.startswith("ppc"): return getCanonPPCArch(arch) if arch.startswith("sparc"): -@@ -339,7 +357,7 @@ def getBestArch(myarch=None): +@@ -339,7 +360,7 @@ def getBestArch(myarch=None): if arch.startswith("sparc64"): arch = multilibArches[arch][1] @@ -144751,13 +144767,15 @@ index 6082005..732f962 100644 arch = 'ppc' return arch -@@ -357,8 +375,10 @@ def getBaseArch(myarch=None): +@@ -357,8 +378,12 @@ def getBaseArch(myarch=None): if myarch.startswith("sparc64"): return "sparc" - elif myarch.startswith("ppc64"): + elif myarch.startswith("ppc64") and not _ppc64_native_is_best: return "ppc" ++ elif myarch.startswith("arm64"): ++ return "arm64" + elif myarch.startswith("armv7h"): + return "armhfp" elif myarch.startswith("arm"): @@ -145166,6 +145184,24 @@ index d0f22be..c185a7f 100644 class FakeSack: """ Fake PackageSack to use with FakeRepository""" +diff --git a/test/yum-leak-test.py b/test/yum-leak-test.py +index 760b770..dd64483 100755 +--- a/test/yum-leak-test.py ++++ b/test/yum-leak-test.py +@@ -33,6 +33,13 @@ def _leak_tst_yb(): + yb.repos.setCacheDir(yum.misc.getCacheDir()) + yb.rpmdb.returnPackages() + yb.pkgSack.returnPackages() ++ yb.tsInfo ++ yb.ts ++ yb.up ++ yb.comps ++ yb.history ++ yb.igroups ++ yb.pkgtags + out_mem(os.getpid()) + time.sleep(4) + diff --git a/test/yum-pylintrc b/test/yum-pylintrc index fa3e57c..ea4e683 100644 --- a/test/yum-pylintrc @@ -147182,7 +147218,7 @@ index abd203f..572112a 100644 - 3.4.1 - umask bug fix. diff --git a/yum/__init__.py b/yum/__init__.py -index 99039e0..9e18874 100644 +index 99039e0..fab3553 100644 --- a/yum/__init__.py +++ b/yum/__init__.py @@ -73,6 +73,7 @@ import logginglevels @@ -147649,6 +147685,15 @@ index 99039e0..9e18874 100644 if (unfinished_transactions_check and misc.find_unfinished_transactions(yumlibpath=self.conf.persistdir)): msg = _('There are unfinished transactions remaining. You might ' \ +@@ -1004,7 +1126,7 @@ class YumBase(depsolve.Depsolve): + # If transaction was changed by postresolve plugins then we should run skipbroken again + (rescode, restring) = self._doSkipBroken(rescode, restring, clear_skipped=False ) + +- if self.tsInfo.pkgSack is not None: # rm Transactions don't have pkgSack ++ if self.tsInfo._pkgSack is not None: # Transactions have pkgSack? + self.tsInfo.pkgSack.dropCachedData() + + # FIXME: This is horrible, see below and yummain. Maybe create a real @@ -1242,13 +1364,15 @@ class YumBase(depsolve.Depsolve): if None in pkgtup: return None @@ -148988,6 +149033,26 @@ index 99039e0..9e18874 100644 else: nevra_dict = self._nevra_kwarg_parse(kwargs) +@@ -3577,8 +4138,8 @@ class YumBase(depsolve.Depsolve): + continue + + # make sure this shouldn't be passed to update: +- if (self.rpmdb.searchNames([po.name]) and +- po.pkgtup in self.up.updating_dict): ++ ipkgs = self.rpmdb.searchNames([po.name]) ++ if ipkgs and po.verGT(sorted(ipkgs)[-1]): + txmbrs = self.update(po=po) + tx_return.extend(txmbrs) + continue +@@ -3587,7 +4148,7 @@ class YumBase(depsolve.Depsolve): + # something else in the repo. Unless there is a obsoletion loop, + # at which point ignore everything. + obsoleting_pkg = None +- if self.conf.obsoletes: ++ if self.conf.obsoletes and not isinstance(po, YumLocalPackage): + obsoleting_pkg = self._test_loop(po, self._pkg2obspkg) + if obsoleting_pkg is not None: + # this is not a definitive check but it'll make sure we don't @@ -3600,23 +4161,23 @@ class YumBase(depsolve.Depsolve): already_obs = pkgs[0] @@ -149092,7 +149157,26 @@ index 99039e0..9e18874 100644 arg = kwargs['pattern'] if not update_to: -@@ -3985,11 +4570,18 @@ class YumBase(depsolve.Depsolve): +@@ -3920,6 +4505,18 @@ class YumBase(depsolve.Depsolve): + tx_return.append(txmbr) + + for available_pkg in availpkgs: ++ # "Just do it" if it's a local pkg. ++ if isinstance(available_pkg, YumLocalPackage): ++ n = available_pkg.name ++ for updated_pkg in self.rpmdb.returnNewestByName(n): ++ updated = updated_pkg.pkgtup ++ if self.tsInfo.getMembersWithState(updated, ++ TS_REMOVE_STATES): ++ self.tsInfo.remove(updated) ++ txmbr = self._add_up_txmbr(requiringPo, ++ available_pkg, updated_pkg) ++ tx_return.append(txmbr) ++ continue + # Make sure we're not installing a package which is obsoleted by + # something else in the repo. Unless there is a obsoletion loop, + # at which point ignore everything. +@@ -3985,11 +4582,18 @@ class YumBase(depsolve.Depsolve): return tx_return def remove(self, po=None, **kwargs): @@ -149116,7 +149200,7 @@ index 99039e0..9e18874 100644 if not po and not kwargs: raise Errors.RemoveError, 'Nothing specified to remove' -@@ -4055,17 +4647,19 @@ class YumBase(depsolve.Depsolve): +@@ -4055,17 +4659,19 @@ class YumBase(depsolve.Depsolve): return tx_return def installLocal(self, pkg, po=None, updateonly=False): @@ -149146,7 +149230,7 @@ index 99039e0..9e18874 100644 # read in the package into a YumLocalPackage Object # append it to self.localPackages # check if it can be installed or updated based on nevra versus rpmdb -@@ -4183,16 +4777,15 @@ class YumBase(depsolve.Depsolve): +@@ -4183,16 +4789,15 @@ class YumBase(depsolve.Depsolve): return tx_return def reinstallLocal(self, pkg, po=None): @@ -149171,7 +149255,7 @@ index 99039e0..9e18874 100644 if not po: try: po = YumUrlPackage(self, ts=self.rpmdb.readOnlyTS(), url=pkg, -@@ -4215,9 +4808,19 @@ class YumBase(depsolve.Depsolve): +@@ -4215,9 +4820,19 @@ class YumBase(depsolve.Depsolve): return self.reinstall(po=po) def reinstall(self, po=None, **kwargs): @@ -149194,7 +149278,7 @@ index 99039e0..9e18874 100644 self._add_prob_flags(rpm.RPMPROB_FILTER_REPLACEPKG, rpm.RPMPROB_FILTER_REPLACENEWFILES, rpm.RPMPROB_FILTER_REPLACEOLDFILES) -@@ -4259,16 +4862,15 @@ class YumBase(depsolve.Depsolve): +@@ -4259,16 +4874,15 @@ class YumBase(depsolve.Depsolve): return tx_mbrs def downgradeLocal(self, pkg, po=None): @@ -149219,7 +149303,7 @@ index 99039e0..9e18874 100644 if not po: try: po = YumUrlPackage(self, ts=self.rpmdb.readOnlyTS(), url=pkg, -@@ -4309,13 +4911,19 @@ class YumBase(depsolve.Depsolve): +@@ -4309,13 +4923,19 @@ class YumBase(depsolve.Depsolve): return False def downgrade(self, po=None, **kwargs): @@ -149246,7 +149330,7 @@ index 99039e0..9e18874 100644 if not po and not kwargs: raise Errors.DowngradeError, 'Nothing specified to downgrade' -@@ -4457,7 +5065,7 @@ class YumBase(depsolve.Depsolve): +@@ -4457,7 +5077,7 @@ class YumBase(depsolve.Depsolve): if e and v and r: evr = '%s:%s-%s' % (e, v, r) elif v and r: @@ -149255,7 +149339,7 @@ index 99039e0..9e18874 100644 elif e and v: evr = '%s:%s' % (e, v) elif v: # e and r etc. is just too weird to print -@@ -4500,12 +5108,24 @@ class YumBase(depsolve.Depsolve): +@@ -4500,12 +5120,24 @@ class YumBase(depsolve.Depsolve): return returndict @@ -149283,7 +149367,7 @@ index 99039e0..9e18874 100644 old_conf_obs = self.conf.obsoletes self.conf.obsoletes = False done = False -@@ -4515,19 +5135,46 @@ class YumBase(depsolve.Depsolve): +@@ -4515,19 +5147,46 @@ class YumBase(depsolve.Depsolve): done = True for pkg in transaction.trans_data: if pkg.state == 'Downgrade': @@ -149330,7 +149414,7 @@ index 99039e0..9e18874 100644 if self.install(pkgtup=pkg.pkgtup): done = True for pkg in transaction.trans_data: -@@ -4538,8 +5185,14 @@ class YumBase(depsolve.Depsolve): +@@ -4538,8 +5197,14 @@ class YumBase(depsolve.Depsolve): return done def history_undo(self, transaction): @@ -149347,7 +149431,7 @@ index 99039e0..9e18874 100644 # NOTE: This is somewhat basic atm. ... for instance we don't check # that we are going from the old new version. However it's still # better than the RHN rollback code, and people pay for that :). -@@ -4674,39 +5327,49 @@ class YumBase(depsolve.Depsolve): +@@ -4674,39 +5339,49 @@ class YumBase(depsolve.Depsolve): if pkgs: pkgs = sorted(pkgs)[-1] msg = (_('Importing %s key 0x%s:\n' @@ -149415,7 +149499,7 @@ index 99039e0..9e18874 100644 user_cb_fail = False for keyurl in keyurls: keys = self._retrievePublicKey(keyurl, repo) -@@ -4725,7 +5388,9 @@ class YumBase(depsolve.Depsolve): +@@ -4725,7 +5400,9 @@ class YumBase(depsolve.Depsolve): # Try installing/updating GPG key self._getKeyImportMessage(info, keyurl) rc = False @@ -149426,7 +149510,7 @@ index 99039e0..9e18874 100644 rc = True # grab the .sig/.asc for the keyurl, if it exists -@@ -4751,8 +5416,8 @@ class YumBase(depsolve.Depsolve): +@@ -4751,8 +5428,8 @@ class YumBase(depsolve.Depsolve): ts = self.rpmdb.readOnlyTS() result = ts.pgpImportPubkey(misc.procgpgkey(info['raw_key'])) if result != 0: @@ -149437,7 +149521,7 @@ index 99039e0..9e18874 100644 self.logger.info(_('Key imported successfully')) key_installed = True -@@ -4760,18 +5425,20 @@ class YumBase(depsolve.Depsolve): +@@ -4760,18 +5437,20 @@ class YumBase(depsolve.Depsolve): raise Errors.YumBaseError, _("Didn't install any keys") if not key_installed: @@ -149463,7 +149547,7 @@ index 99039e0..9e18874 100644 def _getAnyKeyForRepo(self, repo, destdir, keyurl_list, is_cakey=False, callback=None): """ -@@ -4788,6 +5455,18 @@ class YumBase(depsolve.Depsolve): +@@ -4788,6 +5467,18 @@ class YumBase(depsolve.Depsolve): """ key_installed = False @@ -149482,7 +149566,7 @@ index 99039e0..9e18874 100644 user_cb_fail = False for keyurl in keyurl_list: keys = self._retrievePublicKey(keyurl, repo, getSig=not is_cakey) -@@ -4819,8 +5498,11 @@ class YumBase(depsolve.Depsolve): +@@ -4819,8 +5510,11 @@ class YumBase(depsolve.Depsolve): if not key_installed: self._getKeyImportMessage(info, keyurl, keytype) rc = False @@ -149495,7 +149579,7 @@ index 99039e0..9e18874 100644 elif callback: rc = callback({"repo": repo, "userid": info['userid'], "hexkeyid": info['hexkeyid'], "keyurl": keyurl, -@@ -4835,7 +5517,8 @@ class YumBase(depsolve.Depsolve): +@@ -4835,7 +5529,8 @@ class YumBase(depsolve.Depsolve): # Import the key result = misc.import_key_to_pubring(info['raw_key'], info['hexkeyid'], gpgdir=destdir) if not result: @@ -149505,7 +149589,7 @@ index 99039e0..9e18874 100644 self.logger.info(_('Key imported successfully')) key_installed = True # write out the key id to imported_cakeys in the repos basedir -@@ -4851,36 +5534,35 @@ class YumBase(depsolve.Depsolve): +@@ -4851,36 +5546,35 @@ class YumBase(depsolve.Depsolve): pass if not key_installed and user_cb_fail: @@ -149558,7 +149642,7 @@ index 99039e0..9e18874 100644 self._getAnyKeyForRepo(repo, repo.gpgcadir, repo.gpgcakey, is_cakey=True, callback=callback) def _limit_installonly_pkgs(self): -@@ -4959,19 +5641,22 @@ class YumBase(depsolve.Depsolve): +@@ -4959,19 +5653,22 @@ class YumBase(depsolve.Depsolve): txmbr.depends_on.append(rel) def processTransaction(self, callback=None,rpmTestDisplay=None, rpmDisplay=None): @@ -149594,7 +149678,7 @@ index 99039e0..9e18874 100644 if not callback: callback = callbacks.ProcessTransNoOutputCallback() -@@ -5114,13 +5799,19 @@ class YumBase(depsolve.Depsolve): +@@ -5114,13 +5811,19 @@ class YumBase(depsolve.Depsolve): return results def add_enable_repo(self, repoid, baseurls=[], mirrorlist=None, **kwargs): @@ -149621,7 +149705,7 @@ index 99039e0..9e18874 100644 # out of place fixme - maybe we should make this the default repo addition # routine and use it from getReposFromConfigFile(), etc. newrepo = yumRepo.YumRepository(repoid) -@@ -5167,9 +5858,15 @@ class YumBase(depsolve.Depsolve): +@@ -5167,9 +5870,15 @@ class YumBase(depsolve.Depsolve): def setCacheDir(self, force=False, tmpdir=None, reuse=True, suffix='/$basearch/$releasever'): @@ -149640,7 +149724,7 @@ index 99039e0..9e18874 100644 if not force and os.geteuid() == 0: return True # We are root, not forced, so happy with the global dir. if tmpdir is None: -@@ -5220,13 +5917,24 @@ class YumBase(depsolve.Depsolve): +@@ -5220,13 +5929,24 @@ class YumBase(depsolve.Depsolve): self.history.write_addon_data('config-repos', myrepos) def verify_plugins_cb(self, verify_package): @@ -149668,7 +149752,7 @@ index 99039e0..9e18874 100644 if self.tsInfo._unresolvedMembers: if auto: self.logger.critical(_("Dependencies not solved. Will not save unresolved transaction.")) -@@ -5234,7 +5942,7 @@ class YumBase(depsolve.Depsolve): +@@ -5234,7 +5954,7 @@ class YumBase(depsolve.Depsolve): raise Errors.YumBaseError(_("Dependencies not solved. Will not save unresolved transaction.")) if not filename: @@ -149677,7 +149761,16 @@ index 99039e0..9e18874 100644 fd,filename = tempfile.mkstemp(suffix='.yumtx', prefix=prefix) f = os.fdopen(fd, 'w') else: -@@ -5266,7 +5974,17 @@ class YumBase(depsolve.Depsolve): +@@ -5244,7 +5964,7 @@ class YumBase(depsolve.Depsolve): + + msg = "%s\n" % self.rpmdb.simpleVersion(main_only=True)[0] + msg += "%s\n" % self.ts.getTsFlags() +- if self.tsInfo.pkgSack is None: # rm Transactions don't have pkgSack ++ if self.tsInfo._pkgSack is None: # Transactions have pkgSack? + msg += "0\n" + else: + msg += "%s\n" % len(self.repos.listEnabled()) +@@ -5266,7 +5986,17 @@ class YumBase(depsolve.Depsolve): def load_ts(self, filename, ignorerpm=None, ignoremissing=None): @@ -149696,7 +149789,7 @@ index 99039e0..9e18874 100644 # check rpmversion - if not match throw a fit # check repoversions (and repos)- if not match throw a fit # load each txmbr - if pkgs being updated don't exist, bail w/error -@@ -5292,6 +6010,16 @@ class YumBase(depsolve.Depsolve): +@@ -5292,6 +6022,16 @@ class YumBase(depsolve.Depsolve): # 3+numrepos = num pkgs # 3+numrepos+1 -> EOF= txmembers @@ -149713,7 +149806,7 @@ index 99039e0..9e18874 100644 # rpm db ver rpmv = data[0].strip() if rpmv != str(self.rpmdb.simpleVersion(main_only=True)[0]): -@@ -5329,6 +6057,7 @@ class YumBase(depsolve.Depsolve): +@@ -5329,6 +6069,7 @@ class YumBase(depsolve.Depsolve): pkgcount = 0 pkgprob = False curpkg = None @@ -150866,10 +150959,10 @@ index d09511f..fe7e1cb 100644 if name not in cfgOptions and option.default == value: diff --git a/yum/depsolve.py b/yum/depsolve.py -index 6d744c0..a8f9acb 100644 +index 6d744c0..449cf48 100644 --- a/yum/depsolve.py +++ b/yum/depsolve.py -@@ -31,8 +31,8 @@ from transactioninfo import TransactionMember +@@ -31,13 +31,15 @@ from transactioninfo import TransactionMember import rpm from packageSack import ListPackageSack @@ -150879,13 +150972,59 @@ index 6d744c0..a8f9acb 100644 import logginglevels import Errors import warnings -@@ -58,12 +58,12 @@ flags = {"GT": rpm.RPMSENSE_GREATER, + warnings.simplefilter("ignore", Errors.YumFutureDeprecationWarning) + ++from weakref import proxy as weakref ++ + from yum import _, _rpm_ver_atleast + + try: +@@ -58,12 +60,51 @@ flags = {"GT": rpm.RPMSENSE_GREATER, "LE": rpm.RPMSENSE_LESS | rpm.RPMSENSE_EQUAL, "EQ": rpm.RPMSENSE_EQUAL, None: 0 } +_rflags = {} +for f in flags: + _rflags[flags[f]] = f ++ ++ ++class _wrap_ayum_getPkgSack: ++ """ This is a wrapper for calling YumBase.pkgSack because ++ otherwise we take a real reference through the bound method and ++ that is d00m (this applies to YumBase and TransactionInfo, hence why ++ we have a seperate class). """ ++ def __init__(self, ayum): ++ self.ayum = weakref(ayum) ++ def __call__(self): ++ return self.ayum.pkgSack ++ ++class _wrap_ayum_install: ++ """ This is a wrapper for calling YumBase.install because ++ otherwise we take a real reference through the bound method and ++ that is d00m (this applies to YumBase and TransactionInfo, hence why ++ we have a seperate class). """ ++ def __init__(self, ayum): ++ self.ayum = weakref(ayum) ++ def __call__(self, *args, **kwargs): ++ return self.ayum.install(*args, **kwargs) ++class _wrap_ayum_remove: ++ """ This is a wrapper for calling YumBase.remove because ++ otherwise we take a real reference through the bound method and ++ that is d00m (this applies to YumBase and TransactionInfo, hence why ++ we have a seperate class). """ ++ def __init__(self, ayum): ++ self.ayum = weakref(ayum) ++ def __call__(self, *args, **kwargs): ++ return self.ayum.remove(*args, **kwargs) ++class _wrap_ayum_update: ++ """ This is a wrapper for calling YumBase.update because ++ otherwise we take a real reference through the bound method and ++ that is d00m (this applies to YumBase and TransactionInfo, hence why ++ we have a seperate class). """ ++ def __init__(self, ayum): ++ self.ayum = weakref(ayum) ++ def __call__(self, *args, **kwargs): ++ return self.ayum.update(*args, **kwargs) class Depsolve(object): - @@ -150896,7 +151035,7 @@ index 6d744c0..a8f9acb 100644 def __init__(self): self._ts = None -@@ -81,6 +81,8 @@ class Depsolve(object): +@@ -81,6 +122,8 @@ class Depsolve(object): self.installedUnresolvedFileRequires = None def doTsSetup(self): @@ -150905,7 +151044,40 @@ index 6d744c0..a8f9acb 100644 warnings.warn(_('doTsSetup() will go away in a future version of Yum.\n'), Errors.YumFutureDeprecationWarning, stacklevel=2) return self._getTs() -@@ -131,7 +133,7 @@ class Depsolve(object): +@@ -92,7 +135,8 @@ class Depsolve(object): + + if self._tsInfo != None and self._ts != None: + if not remove_only and self._tsInfo.pkgSack is None: +- self._tsInfo.setDatabases(self.rpmdb, self.pkgSack) ++ pkgSackCtor = _wrap_ayum_getPkgSack(self) ++ self._tsInfo.setDatabases(self.rpmdb, None, pkgSackCtor) + return + + if not self.conf.installroot: +@@ -108,14 +152,17 @@ class Depsolve(object): + self._tsInfo = self._transactionDataFactory() + if remove_only: + pkgSack = None ++ pkgSackCtor = None + else: +- pkgSack = self.pkgSack +- self._tsInfo.setDatabases(self.rpmdb, pkgSack) ++ # Don't instant setup, or things like localinstall are screwed. ++ pkgSack = None ++ pkgSackCtor = _wrap_ayum_getPkgSack(self) ++ self._tsInfo.setDatabases(self.rpmdb, pkgSack, pkgSackCtor) + self._tsInfo.installonlypkgs = self.conf.installonlypkgs # this kinda sucks + # this REALLY sucks, sadly (needed for group conditionals) +- self._tsInfo.install_method = self.install +- self._tsInfo.update_method = self.update +- self._tsInfo.remove_method = self.remove ++ self._tsInfo.install_method = _wrap_ayum_install(self) ++ self._tsInfo.update_method = _wrap_ayum_update(self) ++ self._tsInfo.remove_method = _wrap_ayum_remove(self) + return self._tsInfo + + def _setTsInfo(self, value): +@@ -131,7 +178,7 @@ class Depsolve(object): def initActionTs(self): @@ -150914,7 +151086,7 @@ index 6d744c0..a8f9acb 100644 self._ts = rpmUtils.transaction.TransactionWrapper(self.conf.installroot) ts_flags_to_rpm = { 'noscripts': rpm.RPMTRANS_FLAG_NOSCRIPTS, -@@ -158,19 +160,31 @@ class Depsolve(object): +@@ -158,19 +205,31 @@ class Depsolve(object): self._ts.setProbFilter(probfilter) def whatProvides(self, name, flags, version): @@ -150953,7 +151125,7 @@ index 6d744c0..a8f9acb 100644 iopkgs = set(self.conf.installonlypkgs) if po.name in iopkgs: return True -@@ -182,8 +196,11 @@ class Depsolve(object): +@@ -182,8 +241,11 @@ class Depsolve(object): return False def populateTs(self, test=0, keepold=1): @@ -150966,7 +151138,7 @@ index 6d744c0..a8f9acb 100644 if self.dsCallback: self.dsCallback.transactionPopulation() ts_elem = {} -@@ -393,9 +410,27 @@ class Depsolve(object): +@@ -393,9 +455,27 @@ class Depsolve(object): self.conf.obsoletes = 0 txmbrs = self.update(po=requiringPo, requiringPo=requiringPo) self.conf.obsoletes = origobs @@ -150996,7 +151168,7 @@ index 6d744c0..a8f9acb 100644 msg = self._err_missing_requires(requiringPo, requirement) self.verbose_logger.log(logginglevels.DEBUG_2, _('No update paths found for %s. Failure!'), requiringPo) return self._requiringFromTransaction(requiringPo, requirement, errorlist) -@@ -696,6 +731,13 @@ class Depsolve(object): +@@ -696,6 +776,13 @@ class Depsolve(object): self.tsInfo.remove(txmbr.pkgtup) def prof_resolveDeps(self): @@ -151010,7 +151182,7 @@ index 6d744c0..a8f9acb 100644 fn = "anaconda.prof.0" import hotshot, hotshot.stats prof = hotshot.Profile(fn) -@@ -709,6 +751,13 @@ class Depsolve(object): +@@ -709,6 +796,13 @@ class Depsolve(object): return rc def cprof_resolveDeps(self): @@ -151024,7 +151196,7 @@ index 6d744c0..a8f9acb 100644 import cProfile, pstats prof = cProfile.Profile() rc = prof.runcall(self.resolveDeps) -@@ -722,7 +771,17 @@ class Depsolve(object): +@@ -722,7 +816,17 @@ class Depsolve(object): return rc def resolveDeps(self, full_check=True, skipping_broken=False): @@ -151043,7 +151215,7 @@ index 6d744c0..a8f9acb 100644 if not len(self.tsInfo): return (0, [_('Success - empty transaction')]) -@@ -778,6 +837,25 @@ class Depsolve(object): +@@ -778,6 +882,25 @@ class Depsolve(object): if checkdep: break # The next conflict might be the same pkg @@ -151069,7 +151241,7 @@ index 6d744c0..a8f9acb 100644 if CheckDeps: if self.dsCallback: self.dsCallback.restartLoop() self.verbose_logger.log(logginglevels.DEBUG_1, _('Restarting Loop')) -@@ -920,9 +998,12 @@ class Depsolve(object): +@@ -920,9 +1043,12 @@ class Depsolve(object): # if this is an update, we should check what the old # requires were to make things faster @@ -151084,7 +151256,7 @@ index 6d744c0..a8f9acb 100644 oldreqs = set(oldreqs) ret = [] -@@ -1150,6 +1231,11 @@ class Depsolve(object): +@@ -1150,6 +1276,11 @@ class Depsolve(object): return ret def isPackageInstalled(self, pkgname): @@ -151096,7 +151268,7 @@ index 6d744c0..a8f9acb 100644 lst = self.tsInfo.matchNaevr(name = pkgname) for txmbr in lst: if txmbr.output_state in TS_INSTALL_STATES: -@@ -1166,7 +1252,7 @@ class Depsolve(object): +@@ -1166,7 +1297,7 @@ class Depsolve(object): return True _isPackageInstalled = isPackageInstalled @@ -151105,7 +151277,7 @@ index 6d744c0..a8f9acb 100644 """take the list of pkgs and score them based on the requesting package return a dictionary of po=score""" self.verbose_logger.log(logginglevels.DEBUG_4, -@@ -1210,6 +1296,24 @@ class Depsolve(object): +@@ -1210,6 +1341,24 @@ class Depsolve(object): return None return x @@ -151130,7 +151302,7 @@ index 6d744c0..a8f9acb 100644 # Actual start of _compare_providers(). # Do a NameArch filtering, based on repo. __cmp__ -@@ -1332,6 +1436,26 @@ class Depsolve(object): +@@ -1332,6 +1481,26 @@ class Depsolve(object): _('common prefix of %s between %s and %s' % (cpl, po, reqpo))) pkgresults[po] += cpl*2 @@ -151157,7 +151329,7 @@ index 6d744c0..a8f9acb 100644 # If we have more than one "best", see what would happen if we picked # each package ... ie. what things do they require that _aren't_ already -@@ -1393,42 +1517,52 @@ class Depsolve(object): +@@ -1393,42 +1562,52 @@ class Depsolve(object): class DepCheck(object): @@ -153111,6 +153283,63 @@ index 8a6f6f3..f6df93e 100644 if len(self.filelistsdb) == 0: # grab repo object from primarydb and force filelists population in this sack using repo +diff --git a/yum/transactioninfo.py b/yum/transactioninfo.py +index 4d89d83..97de8f0 100644 +--- a/yum/transactioninfo.py ++++ b/yum/transactioninfo.py +@@ -87,7 +87,8 @@ class TransactionData: + self.conditionals = {} # key = pkgname, val = list of pos to add + + self.rpmdb = None +- self.pkgSack = None ++ self._pkgSack = None ++ self._pkgSackCtor = None + self.pkgSackPackages = 0 + self.localSack = PackageSack() + self._inSack = GetProvReqOnlyPackageSack() +@@ -115,6 +116,18 @@ class TransactionData: + else: + return iter(self.getMembers()) + ++ def _getPkgSack(self): ++ if self._pkgSack is not None: ++ return self._pkgSack ++ if self._pkgSackCtor is not None: ++ self._pkgSack = self._pkgSackCtor() ++ return self._pkgSack ++ ++ pkgSack = property(fget=lambda self: self._getPkgSack(), ++ fset=lambda self, value: setattr(self, "_pkgSack",value), ++ fdel=lambda self: setattr(self, "_pkgSack", None), ++ doc="Package sack object") ++ + def debugprint(self, msg): + if self.debug: + print msg +@@ -208,7 +221,9 @@ class TransactionData: + txmbrs = self.matchNaevr(na[0], na[1]) + + if not txmbrs: +- if self.pkgSack is None: ++ if self._inSack is not None: ++ pkgs = self._inSack.returnPackages(patterns=[pattern]) ++ elif self.pkgSack is None: + pkgs = [] + else: + pkgs = self.pkgSack.returnPackages(patterns=[pattern]) +@@ -547,9 +562,10 @@ class TransactionData: + return txmbr + + +- def setDatabases(self, rpmdb, pkgSack): ++ def setDatabases(self, rpmdb, pkgSack, pkgSackCtor=None): + self.rpmdb = rpmdb +- self.pkgSack = pkgSack ++ self._pkgSack = pkgSack ++ self._pkgSackCtor = pkgSackCtor + + def getNewProvides(self, name, flag=None, version=(None, None, None)): + """return dict { packages -> list of matching provides } diff --git a/yum/yumRepo.py b/yum/yumRepo.py index e5e9ece..62e53f8 100644 --- a/yum/yumRepo.py @@ -153232,7 +153461,7 @@ index e5e9ece..62e53f8 100644 return None raise diff --git a/yumcommands.py b/yumcommands.py -index 4dcbea7..e90f43d 100644 +index 4dcbea7..bb4dde8 100644 --- a/yumcommands.py +++ b/yumcommands.py @@ -43,16 +43,24 @@ def _err_mini_usage(base, basecmd): @@ -153367,7 +153596,7 @@ index 4dcbea7..e90f43d 100644 """ if base.repos.listEnabled(): return -@@ -152,85 +199,206 @@ def checkEnabledRepo(base, possible_local_files=[]): +@@ -152,85 +199,207 @@ def checkEnabledRepo(base, possible_local_files=[]): raise cli.CliError class YumCommand: @@ -153528,6 +153757,7 @@ index 4dcbea7..e90f43d 100644 except yum.Errors.YumBaseError, e: return 1, [str(e)] ++ class UpdateCommand(YumCommand): + """A class containing methods needed by the cli to execute the + update command. @@ -153586,7 +153816,7 @@ index 4dcbea7..e90f43d 100644 self.doneCommand(base, _("Setting up Update Process")) try: return base.updatePkgs(extcmds, update_to=(basecmd == 'update-to')) -@@ -238,21 +406,59 @@ class UpdateCommand(YumCommand): +@@ -238,21 +407,59 @@ class UpdateCommand(YumCommand): return 1, [str(e)] class DistroSyncCommand(YumCommand): @@ -153646,7 +153876,7 @@ index 4dcbea7..e90f43d 100644 self.doneCommand(base, _("Setting up Distribution Synchronization Process")) try: base.conf.obsoletes = 1 -@@ -289,16 +495,46 @@ def _list_cmd_calc_columns(base, ypl): +@@ -289,18 +496,53 @@ def _list_cmd_calc_columns(base, ypl): return (-columns[0], -columns[1], -columns[2]) class InfoCommand(YumCommand): @@ -153692,8 +153922,15 @@ index 4dcbea7..e90f43d 100644 + """ try: highlight = base.term.MODE['bold'] ++ # If we are doing: "yum info installed blah" don't do the highlight ++ # because the usability of not accessing the repos. is still higher ++ # than providing colour for a single line. Usable updatesd/etc. FTW. ++ if basecmd == 'info' and extcmds and extcmds[0] == 'installed': ++ highlight = False ypl = base.returnPkgLists(extcmds, installed_available=highlight) -@@ -341,6 +577,7 @@ class InfoCommand(YumCommand): + except yum.Errors.YumBaseError, e: + return 1, [str(e)] +@@ -341,6 +583,7 @@ class InfoCommand(YumCommand): local_pkgs[(po.name, po.arch)] = po # Output the packages: @@ -153701,7 +153938,7 @@ index 4dcbea7..e90f43d 100644 clio = base.conf.color_list_installed_older clin = base.conf.color_list_installed_newer clir = base.conf.color_list_installed_reinstall -@@ -348,7 +585,9 @@ class InfoCommand(YumCommand): +@@ -348,7 +591,9 @@ class InfoCommand(YumCommand): rip = base.listPkgs(ypl.installed, _('Installed Packages'), basecmd, highlight_na=update_pkgs, columns=columns, highlight_modes={'>' : clio, '<' : clin, @@ -153711,7 +153948,7 @@ index 4dcbea7..e90f43d 100644 clau = base.conf.color_list_available_upgrade clad = base.conf.color_list_available_downgrade clar = base.conf.color_list_available_reinstall -@@ -356,6 +595,7 @@ class InfoCommand(YumCommand): +@@ -356,6 +601,7 @@ class InfoCommand(YumCommand): rap = base.listPkgs(ypl.available, _('Available Packages'), basecmd, highlight_na=inst_pkgs, columns=columns, highlight_modes={'<' : clau, '>' : clad, @@ -153719,7 +153956,7 @@ index 4dcbea7..e90f43d 100644 '=' : clar, 'not in' : clai}) rep = base.listPkgs(ypl.extras, _('Extra Packages'), basecmd, columns=columns) -@@ -389,35 +629,95 @@ class InfoCommand(YumCommand): +@@ -389,35 +635,95 @@ class InfoCommand(YumCommand): return 0, [] def needTs(self, base, basecmd, extcmds): @@ -153815,7 +154052,7 @@ index 4dcbea7..e90f43d 100644 self.doneCommand(base, _("Setting up Remove Process")) try: return base.erasePkgs(extcmds) -@@ -425,9 +725,25 @@ class EraseCommand(YumCommand): +@@ -425,9 +731,25 @@ class EraseCommand(YumCommand): return 1, [str(e)] def needTs(self, base, basecmd, extcmds): @@ -153841,7 +154078,7 @@ index 4dcbea7..e90f43d 100644 return True -@@ -442,12 +758,25 @@ class GroupsCommand(YumCommand): +@@ -442,12 +764,25 @@ class GroupsCommand(YumCommand): 'groupinfo' : 'info'} def getNames(self): @@ -153867,7 +154104,7 @@ index 4dcbea7..e90f43d 100644 return _("Display, or use, the groups information") def _grp_setup_doCommand(self, base): -@@ -470,6 +799,10 @@ class GroupsCommand(YumCommand): +@@ -470,6 +805,10 @@ class GroupsCommand(YumCommand): else: cmd = 'summary' @@ -153878,7 +154115,7 @@ index 4dcbea7..e90f43d 100644 remap = {'update' : 'upgrade', 'erase' : 'remove', 'mark-erase' : 'mark-remove', -@@ -479,32 +812,70 @@ class GroupsCommand(YumCommand): +@@ -479,32 +818,70 @@ class GroupsCommand(YumCommand): return cmd, extcmds def doCheck(self, base, basecmd, extcmds): @@ -153959,7 +154196,7 @@ index 4dcbea7..e90f43d 100644 cmd, extcmds = self._grp_cmd(basecmd, extcmds) self._grp_setup_doCommand(base) -@@ -524,39 +895,195 @@ class GroupsCommand(YumCommand): +@@ -524,39 +901,195 @@ class GroupsCommand(YumCommand): if cmd == 'remove': return base.removeGroups(extcmds) @@ -154156,7 +154393,7 @@ index 4dcbea7..e90f43d 100644 base.logger.debug(_("Making cache files for all metadata files.")) base.logger.debug(_("This may take a while depending on the speed of this computer")) try: -@@ -572,9 +1099,7 @@ class MakeCacheCommand(YumCommand): +@@ -572,9 +1105,7 @@ class MakeCacheCommand(YumCommand): # we can't remove them until *LoadRepo() can do: # 1. Download a .sqlite.bz2 and convert to .sqlite # 2. Download a .xml.gz and convert to .xml.gz.sqlite @@ -154167,7 +154404,7 @@ index 4dcbea7..e90f43d 100644 except yum.Errors.YumBaseError, e: -@@ -582,44 +1107,134 @@ class MakeCacheCommand(YumCommand): +@@ -582,44 +1113,134 @@ class MakeCacheCommand(YumCommand): return 0, [_('Metadata Cache Created')] def needTs(self, base, basecmd, extcmds): @@ -154302,7 +154539,7 @@ index 4dcbea7..e90f43d 100644 base.logger.debug("Searching Packages: ") try: return base.provides(extcmds) -@@ -627,19 +1242,56 @@ class ProvidesCommand(YumCommand): +@@ -627,19 +1248,56 @@ class ProvidesCommand(YumCommand): return 1, [str(e)] class CheckUpdateCommand(YumCommand): @@ -154359,7 +154596,7 @@ index 4dcbea7..e90f43d 100644 obscmds = ['obsoletes'] + extcmds base.extcmds.insert(0, 'updates') result = 0 -@@ -681,19 +1333,56 @@ class CheckUpdateCommand(YumCommand): +@@ -681,19 +1339,56 @@ class CheckUpdateCommand(YumCommand): return result, [] class SearchCommand(YumCommand): @@ -154416,7 +154653,7 @@ index 4dcbea7..e90f43d 100644 base.logger.debug(_("Searching Packages: ")) try: return base.search(extcmds) -@@ -701,24 +1390,70 @@ class SearchCommand(YumCommand): +@@ -701,24 +1396,70 @@ class SearchCommand(YumCommand): return 1, [str(e)] def needTs(self, base, basecmd, extcmds): @@ -154487,7 +154724,7 @@ index 4dcbea7..e90f43d 100644 base.conf.obsoletes = 1 self.doneCommand(base, _("Setting up Upgrade Process")) try: -@@ -727,25 +1462,64 @@ class UpgradeCommand(YumCommand): +@@ -727,25 +1468,64 @@ class UpgradeCommand(YumCommand): return 1, [str(e)] class LocalInstallCommand(YumCommand): @@ -154552,7 +154789,7 @@ index 4dcbea7..e90f43d 100644 self.doneCommand(base, _("Setting up Local Package Process")) updateonly = basecmd == 'localupdate' -@@ -755,19 +1529,61 @@ class LocalInstallCommand(YumCommand): +@@ -755,19 +1535,61 @@ class LocalInstallCommand(YumCommand): return 1, [str(e)] def needTs(self, base, basecmd, extcmds): @@ -154615,7 +154852,7 @@ index 4dcbea7..e90f43d 100644 base.logger.debug(_("Searching Packages for Dependency:")) try: return base.resolveDepCli(extcmds) -@@ -775,19 +1591,56 @@ class ResolveDepCommand(YumCommand): +@@ -775,19 +1597,56 @@ class ResolveDepCommand(YumCommand): return 1, [str(e)] class ShellCommand(YumCommand): @@ -154672,7 +154909,7 @@ index 4dcbea7..e90f43d 100644 self.doneCommand(base, _('Setting up Yum Shell')) try: return base.doShell() -@@ -795,23 +1648,69 @@ class ShellCommand(YumCommand): +@@ -795,23 +1654,69 @@ class ShellCommand(YumCommand): return 1, [str(e)] def needTs(self, base, basecmd, extcmds): @@ -154742,7 +154979,7 @@ index 4dcbea7..e90f43d 100644 self.doneCommand(base, _("Finding dependencies: ")) try: return base.deplist(extcmds) -@@ -820,17 +1719,46 @@ class DepListCommand(YumCommand): +@@ -820,17 +1725,46 @@ class DepListCommand(YumCommand): class RepoListCommand(YumCommand): @@ -154789,7 +155026,7 @@ index 4dcbea7..e90f43d 100644 def _repo_size(repo): ret = 0 for pkg in repo.sack.returnPackages(): -@@ -866,6 +1794,13 @@ class RepoListCommand(YumCommand): +@@ -866,6 +1800,13 @@ class RepoListCommand(YumCommand): except yum.Errors.RepoError: if verbose: raise @@ -154803,7 +155040,7 @@ index 4dcbea7..e90f43d 100644 repos = base.repos.repos.values() repos.sort() -@@ -924,111 +1859,108 @@ class RepoListCommand(YumCommand): +@@ -924,111 +1865,108 @@ class RepoListCommand(YumCommand): ui_enabled = dhibeg + _('disabled') + hiend ui_endis_wid = utf8_width(_('disabled')) @@ -155008,7 +155245,7 @@ index 4dcbea7..e90f43d 100644 if not verbose and cols: # Work out the first (id) and last (enabled/disalbed/count), -@@ -1088,21 +2020,54 @@ class RepoListCommand(YumCommand): +@@ -1088,21 +2026,54 @@ class RepoListCommand(YumCommand): return 0, ['repolist: ' +to_unicode(locale.format("%d", tot_num, True))] def needTs(self, base, basecmd, extcmds): @@ -155063,7 +155300,7 @@ index 4dcbea7..e90f43d 100644 if len(extcmds) == 0: base.usage() raise cli.CliError -@@ -1147,28 +2112,85 @@ class HelpCommand(YumCommand): +@@ -1147,28 +2118,85 @@ class HelpCommand(YumCommand): return help_output def doCommand(self, base, basecmd, extcmds): @@ -155149,7 +155386,7 @@ index 4dcbea7..e90f43d 100644 self.doneCommand(base, _("Setting up Reinstall Process")) try: return base.reinstallPkgs(extcmds) -@@ -1177,25 +2199,73 @@ class ReInstallCommand(YumCommand): +@@ -1177,25 +2205,73 @@ class ReInstallCommand(YumCommand): return 1, [to_unicode(e)] def getSummary(self): @@ -155223,7 +155460,7 @@ index 4dcbea7..e90f43d 100644 self.doneCommand(base, _("Setting up Downgrade Process")) try: return base.downgradePkgs(extcmds) -@@ -1203,23 +2273,65 @@ class DowngradeCommand(YumCommand): +@@ -1203,23 +2279,65 @@ class DowngradeCommand(YumCommand): return 1, [str(e)] def getSummary(self): @@ -155289,7 +155526,7 @@ index 4dcbea7..e90f43d 100644 vcmd = 'installed' if extcmds: vcmd = extcmds[0] -@@ -1344,6 +2456,14 @@ class VersionCommand(YumCommand): +@@ -1344,6 +2462,14 @@ class VersionCommand(YumCommand): return 0, ['version'] def needTs(self, base, basecmd, extcmds): @@ -155304,7 +155541,7 @@ index 4dcbea7..e90f43d 100644 vcmd = 'installed' if extcmds: vcmd = extcmds[0] -@@ -1354,23 +2474,62 @@ class VersionCommand(YumCommand): +@@ -1354,23 +2480,62 @@ class VersionCommand(YumCommand): class HistoryCommand(YumCommand): @@ -155368,7 +155605,7 @@ index 4dcbea7..e90f43d 100644 return 2, ["Repeating transaction %u" % (old.tid,)] def _hcmd_undo(self, base, extcmds): -@@ -1426,12 +2585,54 @@ class HistoryCommand(YumCommand): +@@ -1426,12 +2591,54 @@ class HistoryCommand(YumCommand): def _hcmd_new(self, base, extcmds): base.history._create_db_file() @@ -155424,7 +155661,7 @@ index 4dcbea7..e90f43d 100644 if extcmds and extcmds[0] not in cmds: base.logger.critical(_('Invalid history sub-command, use: %s.'), ", ".join(cmds)) -@@ -1444,6 +2645,19 @@ class HistoryCommand(YumCommand): +@@ -1444,6 +2651,19 @@ class HistoryCommand(YumCommand): raise cli.CliError def doCommand(self, base, basecmd, extcmds): @@ -155444,7 +155681,7 @@ index 4dcbea7..e90f43d 100644 vcmd = 'list' if extcmds: vcmd = extcmds[0] -@@ -1468,12 +2682,26 @@ class HistoryCommand(YumCommand): +@@ -1468,12 +2688,26 @@ class HistoryCommand(YumCommand): ret = self._hcmd_rollback(base, extcmds) elif vcmd == 'new': ret = self._hcmd_new(base, extcmds) @@ -155471,7 +155708,7 @@ index 4dcbea7..e90f43d 100644 vcmd = 'list' if extcmds: vcmd = extcmds[0] -@@ -1481,16 +2709,46 @@ class HistoryCommand(YumCommand): +@@ -1481,16 +2715,46 @@ class HistoryCommand(YumCommand): class CheckRpmdbCommand(YumCommand): @@ -155518,7 +155755,7 @@ index 4dcbea7..e90f43d 100644 chkcmd = 'all' if extcmds: chkcmd = extcmds -@@ -1505,19 +2763,57 @@ class CheckRpmdbCommand(YumCommand): +@@ -1505,19 +2769,57 @@ class CheckRpmdbCommand(YumCommand): return rc, ['%s %s' % (basecmd, chkcmd)] def needTs(self, base, basecmd, extcmds): @@ -155576,7 +155813,7 @@ index 4dcbea7..e90f43d 100644 if not extcmds: base.logger.critical(_("No saved transaction file specified.")) raise cli.CliError -@@ -1533,5 +2829,13 @@ class LoadTransactionCommand(YumCommand): +@@ -1533,5 +2835,13 @@ class LoadTransactionCommand(YumCommand): def needTs(self, base, basecmd, extcmds): diff --git a/yum.spec b/yum.spec index b291843..eed5a57 100644 --- a/yum.spec +++ b/yum.spec @@ -18,7 +18,7 @@ Summary: RPM package installer/updater/manager Name: yum Version: 3.4.3 -Release: 19%{?dist} +Release: 20%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz @@ -311,6 +311,13 @@ exit 0 %endif %changelog +* Wed Feb 29 2012 James Antill - 3.4.3-20 +- update to latest HEAD. +- Lazy setup pkgSack, for localinstall/etc. +- add support for 64 bit arm hardware. +- Hack for "info install blah" to never look at repos. +- Fixup resolvedep command for mock users. + * Mon Feb 20 2012 James Antill - 3.4.3-19 - update to latest HEAD. - Add a yum group convert command, so people can use groups as objects easily.