diff --git a/latest-head4rawhide.sh b/latest-head4rawhide.sh index aa5c0d8..6cc707b 100755 --- a/latest-head4rawhide.sh +++ b/latest-head4rawhide.sh @@ -11,9 +11,14 @@ if [ "x$1" = "xseth" ]; then cvs=~/proj/fedora/yum/master git=~/proj/yum/3.2.X fi +if [ "x$1" = "xvalentina" ]; then + done=true + cvs=~/devel/fedora/yum + git=~/devel/upstream/yum +fi if ! $done; then - echo " Usage: $0 james | seth" 1>&2 + echo " Usage: $0 james | seth | valentina" 1>&2 echo "" 1>&2 echo " This command copies the latest git HEAD into Fedora rawhide," 1>&2 echo " working out the versions automatically. It also makes the" 1>&2 diff --git a/yum-HEAD.patch b/yum-HEAD.patch index 23ebfa0..04000e2 100644 --- a/yum-HEAD.patch +++ b/yum-HEAD.patch @@ -109,7 +109,7 @@ index 2f6154e..2e5a052 100644 diff --git a/cli.py b/cli.py old mode 100644 new mode 100755 -index 6056d38..7173688 +index 6056d38..c1ef023 --- a/cli.py +++ b/cli.py @@ -25,7 +25,7 @@ import sys @@ -164,7 +164,15 @@ index 6056d38..7173688 def __init__(self): # handle sigquit early on -@@ -104,17 +107,32 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -84,6 +87,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): + self.registerCommand(yumcommands.InfoCommand()) + self.registerCommand(yumcommands.ListCommand()) + self.registerCommand(yumcommands.EraseCommand()) ++ self.registerCommand(yumcommands.AutoremoveCommand()) + self.registerCommand(yumcommands.GroupsCommand()) + self.registerCommand(yumcommands.MakeCacheCommand()) + self.registerCommand(yumcommands.CleanCommand()) +@@ -104,17 +108,32 @@ class YumBaseCli(yum.YumBase, output.YumOutput): self.registerCommand(yumcommands.CheckRpmdbCommand()) self.registerCommand(yumcommands.DistroSyncCommand()) self.registerCommand(yumcommands.LoadTransactionCommand()) @@ -200,7 +208,7 @@ index 6056d38..7173688 if self._repos and thisrepo is None: return self._repos -@@ -163,9 +181,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -163,9 +182,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput): mainopts = yum.misc.GenericHolder() mainopts.items = [] @@ -222,7 +230,7 @@ index 6056d38..7173688 if period != -1: repo = k[:period] k = k[period+1:] -@@ -180,13 +208,15 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -180,13 +209,15 @@ class YumBaseCli(yum.YumBase, output.YumOutput): self.main_setopts = mainopts self.repo_setopts = repoopts @@ -243,7 +251,7 @@ index 6056d38..7173688 self.optparser = YumOptionParser(base=self, usage=self._makeUsage()) # Parse only command line options that affect basic yum setup -@@ -199,7 +229,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -199,7 +230,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): opts.verbose = False # go through all the setopts and set the global ones @@ -252,7 +260,7 @@ index 6056d38..7173688 if self.main_setopts: for opt in self.main_setopts.items: -@@ -229,6 +259,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -229,6 +260,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput): pc.releasever = opts.releasever self.conf @@ -265,7 +273,7 @@ index 6056d38..7173688 # now set all the non-first-start opts from main from our setopts if self.main_setopts: for opt in self.main_setopts.items: -@@ -238,10 +274,14 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -238,10 +275,14 @@ class YumBaseCli(yum.YumBase, output.YumOutput): setattr(self.conf, opt, getattr(self.main_setopts, opt)) except yum.Errors.ConfigError, e: @@ -282,7 +290,7 @@ index 6056d38..7173688 sys.exit(1) # update usage in case plugins have added commands -@@ -263,11 +303,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -263,11 +304,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput): if opts.verbose: opts.debuglevel = opts.errorlevel = 6 if opts.debuglevel != pc.debuglevel or opts.errorlevel != pc.errorlevel: @@ -296,7 +304,7 @@ index 6056d38..7173688 if opts.version: self.conf.cache = 1 -@@ -290,9 +330,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -290,9 +331,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput): self.term.MODE['normal']) print _(" Installed: %s-%s at %s") %(name, ver, sm_ui_time(pkg.installtime)) @@ -308,7 +316,7 @@ index 6056d38..7173688 sm_ui_date(pkg.committime)) sys.exit(0) -@@ -318,10 +358,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -318,10 +359,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput): time.sleep(sleeptime) def parseCommands(self): @@ -325,7 +333,7 @@ index 6056d38..7173688 self.verbose_logger.log(yum.logginglevels.DEBUG_4, 'COMMAND: %s', self.cmdstring) self.verbose_logger.log(yum.logginglevels.DEBUG_4, -@@ -349,8 +391,57 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -349,8 +392,57 @@ class YumBaseCli(yum.YumBase, output.YumOutput): self.basecmd, sys.argv[0]) raise CliError @@ -383,7 +391,7 @@ index 6056d38..7173688 def _shell_history_write(self): if not hasattr(self, '_shell_history_cmds'): return -@@ -365,7 +456,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -365,7 +457,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput): self.history.write_addon_data('shell-cmds', data) def doShell(self): @@ -396,7 +404,7 @@ index 6056d38..7173688 yumshell = shell.YumShell(base=self) -@@ -382,8 +477,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -382,8 +478,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return yumshell.result, yumshell.resultmsgs def errorSummary(self, errstring): @@ -411,7 +419,7 @@ index 6056d38..7173688 summary = '' # do disk space report first p = re.compile('needs (\d+)MB on the (\S+) filesystem') -@@ -407,17 +506,45 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -407,17 +507,45 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return summary @@ -467,7 +475,7 @@ index 6056d38..7173688 # at this point we know the args are valid - we don't know their meaning # but we know we're not being sent garbage -@@ -435,14 +562,37 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -435,14 +563,37 @@ class YumBaseCli(yum.YumBase, output.YumOutput): try: self._getTs(needTsRemove) except yum.Errors.YumBaseError, e: @@ -509,7 +517,7 @@ index 6056d38..7173688 # just make sure there's not, well, nothing to do if len(self.tsInfo) == 0: self.verbose_logger.info(_('Trying to run the transaction but nothing to do. Exiting.')) -@@ -453,7 +603,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -453,7 +604,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): lsts = self.listTransaction() if self.verbose_logger.isEnabledFor(yum.logginglevels.INFO_1): self.verbose_logger.log(yum.logginglevels.INFO_1, lsts) @@ -518,7 +526,7 @@ index 6056d38..7173688 # If we are in quiet, and assumeyes isn't on we want to output # at least the transaction list anyway. self.logger.warn(lsts) -@@ -463,7 +613,6 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -463,7 +614,6 @@ class YumBaseCli(yum.YumBase, output.YumOutput): rmpkgs = [] stuff_to_download = False install_only = True @@ -526,7 +534,7 @@ index 6056d38..7173688 for txmbr in self.tsInfo.getMembers(): if txmbr.ts_state not in ('i', 'u'): install_only = False -@@ -471,7 +620,6 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -471,7 +621,6 @@ class YumBaseCli(yum.YumBase, output.YumOutput): if po: rmpkgs.append(po) else: @@ -534,7 +542,7 @@ index 6056d38..7173688 stuff_to_download = True po = txmbr.po if po: -@@ -489,19 +637,40 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -489,19 +638,40 @@ class YumBaseCli(yum.YumBase, output.YumOutput): else: self.reportDownloadSize(downloadpkgs, install_only) @@ -580,7 +588,7 @@ index 6056d38..7173688 for key in problems: errors = yum.misc.unique(problems[key]) for error in errors: -@@ -520,8 +689,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -520,8 +690,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput): rcd_st = time.time() self.verbose_logger.log(yum.logginglevels.INFO_2, @@ -591,7 +599,7 @@ index 6056d38..7173688 if msgs: rpmlib_only = True for msg in msgs: -@@ -532,21 +702,23 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -532,21 +703,23 @@ class YumBaseCli(yum.YumBase, output.YumOutput): print _("ERROR You need to update rpm to handle:") else: print _('ERROR with transaction check vs depsolve:') @@ -620,7 +628,7 @@ index 6056d38..7173688 self.ts.order() # order the transaction self.ts.clean() # release memory not needed beyond this point -@@ -556,16 +728,16 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -556,16 +729,16 @@ class YumBaseCli(yum.YumBase, output.YumOutput): del testcb if len(tserrors) > 0: @@ -640,7 +648,7 @@ index 6056d38..7173688 # unset the sigquit handler signal.signal(signal.SIGQUIT, signal.SIG_DFL) -@@ -595,7 +767,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -595,7 +768,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): if self.conf.debuglevel < 2: cb.display.output = False @@ -649,7 +657,7 @@ index 6056d38..7173688 resultobject = self.runTransaction(cb=cb) self.verbose_logger.debug('Transaction time: %0.3f' % (time.time() - ts_st)) -@@ -609,12 +781,14 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -609,12 +782,14 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return resultobject.return_code def gpgsigcheck(self, pkgs): @@ -669,7 +677,7 @@ index 6056d38..7173688 for po in pkgs: result, errmsg = self.sigCheckPkg(po) -@@ -623,7 +797,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -623,7 +798,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput): continue elif result == 1: @@ -679,7 +687,7 @@ index 6056d38..7173688 raise yum.Errors.YumBaseError, \ _('Refusing to automatically import keys when running ' \ 'unattended.\nUse "-y" to override.') -@@ -691,12 +866,62 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -691,12 +867,62 @@ class YumBaseCli(yum.YumBase, output.YumOutput): ", ".join(matches)) self.verbose_logger.log(yum.logginglevels.INFO_2, msg) @@ -748,7 +756,7 @@ index 6056d38..7173688 # get the list of available packages # iterate over the user's list # add packages to Transaction holding class if they match. -@@ -710,11 +935,38 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -710,11 +936,38 @@ class YumBaseCli(yum.YumBase, output.YumOutput): for arg in userlist: if (arg.endswith('.rpm') and (yum.misc.re_remote_url(arg) or os.path.exists(arg))): @@ -789,7 +797,7 @@ index 6056d38..7173688 except yum.Errors.InstallError: self.verbose_logger.log(yum.logginglevels.INFO_2, _('No package %s%s%s available.'), -@@ -723,6 +975,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -723,6 +976,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): self._maybeYouMeant(arg) else: done = True @@ -797,7 +805,7 @@ index 6056d38..7173688 if len(self.tsInfo) > oldcount: change = len(self.tsInfo) - oldcount return 2, [P_('%d package to install', '%d packages to install', change) % change] -@@ -732,9 +985,27 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -732,9 +986,27 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return 0, [_('Nothing to do')] def updatePkgs(self, userlist, quiet=0, update_to=False): @@ -828,7 +836,7 @@ index 6056d38..7173688 # if there is no userlist, then do global update below # this is probably 90% of the calls # if there is a userlist then it's for updating pkgs, not obsoleting -@@ -745,34 +1016,46 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -745,34 +1017,46 @@ class YumBaseCli(yum.YumBase, output.YumOutput): else: # go through the userlist - look for items that are local rpms. If we find them @@ -892,7 +900,7 @@ index 6056d38..7173688 level = 'diff' if userlist and userlist[0] in ('full', 'diff', 'different'): -@@ -831,6 +1114,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -831,6 +1115,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): continue nayi = napkg.yumdb_info @@ -900,7 +908,7 @@ index 6056d38..7173688 for apkg in self.pkgSack.searchPkgTuple(napkg.pkgtup): if ('checksum_type' in nayi and 'checksum_data' in nayi and -@@ -861,19 +1145,58 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -861,19 +1146,58 @@ class YumBaseCli(yum.YumBase, output.YumOutput): dupdates.extend(self.downgrade(name=n, epoch=e, ver=v, rel=r)) if dupdates: @@ -967,7 +975,7 @@ index 6056d38..7173688 if not rms: self._checkMaybeYouMeant(arg, always_output=False, rpmdb_only=True) all_rms.extend(rms) -@@ -884,12 +1207,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -884,12 +1208,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return 0, [_('No Packages marked for removal')] def downgradePkgs(self, userlist): @@ -995,7 +1003,7 @@ index 6056d38..7173688 for arg in userlist: if (arg.endswith('.rpm') and (yum.misc.re_remote_url(arg) or os.path.exists(arg))): -@@ -905,26 +1240,44 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -905,26 +1241,44 @@ class YumBaseCli(yum.YumBase, output.YumOutput): self.term.MODE['bold'], arg, self.term.MODE['normal']) self._maybeYouMeant(arg) @@ -1044,7 +1052,7 @@ index 6056d38..7173688 except yum.Errors.ReinstallRemoveError: self._checkMaybeYouMeant(arg, always_output=False) except yum.Errors.ReinstallInstallError, e: -@@ -940,22 +1293,38 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -940,22 +1294,38 @@ class YumBaseCli(yum.YumBase, output.YumOutput): except yum.Errors.ReinstallError, e: assert False, "Shouldn't happen, but just in case" self.verbose_logger.log(yum.logginglevels.INFO_2, e) @@ -1087,7 +1095,7 @@ index 6056d38..7173688 installing = False for pkg in filelist: -@@ -971,23 +1340,29 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -971,23 +1341,29 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return 2, [_('Package(s) to install')] return 0, [_('Nothing to do')] @@ -1133,7 +1141,7 @@ index 6056d38..7173688 pkgnarrow = 'all' done_hidden_available = False -@@ -1003,7 +1378,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1003,7 +1379,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): pkgnarrow = extcmds.pop(0) ypl = self.doPackageLists(pkgnarrow=pkgnarrow, patterns=extcmds, @@ -1142,7 +1150,7 @@ index 6056d38..7173688 if self.conf.showdupesfromrepos: ypl.available += ypl.reinstall_available -@@ -1017,8 +1392,25 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1017,8 +1393,25 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return ypl def search(self, args): @@ -1170,7 +1178,7 @@ index 6056d38..7173688 # call the yum module search function with lists of tags to search # and what to search for -@@ -1053,7 +1445,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1053,7 +1446,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): print "" else: mkeys = set(keys) @@ -1179,7 +1187,7 @@ index 6056d38..7173688 okeys = keys pos.add(po) akeys.update(keys) -@@ -1104,13 +1496,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1104,13 +1497,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput): self.logger.warning(_('Warning: No matches found for: %s'), arg) if not akeys: @@ -1207,7 +1215,7 @@ index 6056d38..7173688 pkgs = [] for arg in args: if (arg.endswith('.rpm') and (yum.misc.re_remote_url(arg) or -@@ -1118,10 +1521,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1118,10 +1522,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput): thispkg = yum.packages.YumUrlPackage(self, self.ts, arg) pkgs.append(thispkg) elif self.conf.showdupesfromrepos: @@ -1222,7 +1230,7 @@ index 6056d38..7173688 except yum.Errors.PackageSackError: pass -@@ -1131,10 +1536,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1131,10 +1537,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return 0, [] def provides(self, args): @@ -1246,7 +1254,7 @@ index 6056d38..7173688 old_sdup = self.conf.showdupesfromrepos # For output, as searchPackageProvides() is always in showdups mode self.conf.showdupesfromrepos = True -@@ -1147,6 +1561,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1147,6 +1562,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput): paths = set(sys.path + os.environ['PATH'].split(':')) nargs = [] for arg in args: @@ -1255,7 +1263,7 @@ index 6056d38..7173688 if yum.misc.re_filename(arg) or yum.misc.re_glob(arg): continue for path in paths: -@@ -1158,25 +1574,82 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1158,25 +1575,82 @@ class YumBaseCli(yum.YumBase, output.YumOutput): self.conf.showdupesfromrepos = old_sdup if len(matching) == 0: @@ -1344,7 +1352,7 @@ index 6056d38..7173688 hdrcode = pkgcode = xmlcode = dbcode = expccode = 0 pkgresults = hdrresults = xmlresults = dbresults = expcresults = [] msg = self.fmtKeyValFill(_('Cleaning repos: '), -@@ -1184,7 +1657,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1184,7 +1658,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): self.verbose_logger.log(yum.logginglevels.INFO_2, msg) if 'all' in userlist: self.verbose_logger.log(yum.logginglevels.INFO_2, @@ -1353,7 +1361,7 @@ index 6056d38..7173688 pkgcode, pkgresults = self.cleanPackages() hdrcode, hdrresults = self.cleanHeaders() xmlcode, xmlresults = self.cleanMetadata() -@@ -1200,10 +1673,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1200,10 +1674,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return code, [] if 'headers' in userlist: @@ -1366,7 +1374,7 @@ index 6056d38..7173688 pkgcode, pkgresults = self.cleanPackages() if 'metadata' in userlist: self.logger.debug(_('Cleaning up xml metadata')) -@@ -1228,159 +1701,345 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1228,159 +1702,345 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return code, [] def returnGroupLists(self, userlist): @@ -1803,7 +1811,7 @@ index 6056d38..7173688 return 0, [_('No packages to remove from groups')] else: return 2, [P_('%d package to remove', '%d packages to remove', len(pkgs_used)) % len(pkgs_used)] -@@ -1389,7 +2048,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1389,7 +2049,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput): def _promptWanted(self): # shortcut for the always-off/always-on options @@ -1812,7 +1820,7 @@ index 6056d38..7173688 return False if self.conf.alwaysprompt: return True -@@ -1397,10 +2056,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1397,10 +2057,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput): # prompt if: # package was added to fill a dependency # package is being removed @@ -1824,7 +1832,7 @@ index 6056d38..7173688 txmbr.name not in self.extcmds: return True -@@ -1408,11 +2066,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1408,11 +2067,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return False def usage(self): @@ -1838,7 +1846,7 @@ index 6056d38..7173688 sys.stdout.write(self.optparser.get_usage()) def _installable(self, pkg, ematch=False): -@@ -1468,9 +2126,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput): +@@ -1468,9 +2127,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput): return False class YumOptionParser(OptionParser): @@ -1850,7 +1858,7 @@ index 6056d38..7173688 def __init__(self,base, **kwargs): # check if this is called with a utils=True/False parameter -@@ -1488,13 +2146,23 @@ class YumOptionParser(OptionParser): +@@ -1488,13 +2147,23 @@ class YumOptionParser(OptionParser): self._addYumBasicOptions() def error(self, msg): @@ -1876,7 +1884,7 @@ index 6056d38..7173688 try: args = _filtercmdline( ('--noplugins','--version','-q', '-v', "--quiet", "--verbose"), -@@ -1521,7 +2189,15 @@ class YumOptionParser(OptionParser): +@@ -1521,7 +2190,15 @@ class YumOptionParser(OptionParser): return ret def setupYumConfig(self, args=None): @@ -1893,7 +1901,7 @@ index 6056d38..7173688 if not args: (opts, cmds) = self.parse_args() else: -@@ -1533,16 +2209,30 @@ class YumOptionParser(OptionParser): +@@ -1533,16 +2210,30 @@ class YumOptionParser(OptionParser): try: # config file is parsed and moving us forward # set some things in it. @@ -1930,7 +1938,7 @@ index 6056d38..7173688 self.base.conf.cache = 1 if opts.obsoletes: -@@ -1574,11 +2264,8 @@ class YumOptionParser(OptionParser): +@@ -1574,11 +2265,8 @@ class YumOptionParser(OptionParser): if opts.color != 'auto': self.base.term.reinit(color=opts.color) @@ -1944,7 +1952,7 @@ index 6056d38..7173688 for exclude in self._splitArg(opts.exclude): try: -@@ -1610,10 +2297,6 @@ class YumOptionParser(OptionParser): +@@ -1610,10 +2298,6 @@ class YumOptionParser(OptionParser): self.base.usage() sys.exit(1) @@ -1955,7 +1963,7 @@ index 6056d38..7173688 # Disable all gpg key checking, if requested. if opts.nogpgcheck: # Altering the normal configs. doesn't work too well, esp. with -@@ -1623,7 +2306,7 @@ class YumOptionParser(OptionParser): +@@ -1623,7 +2307,7 @@ class YumOptionParser(OptionParser): repo._override_sigchecks = True except ValueError, e: @@ -1964,7 +1972,7 @@ index 6056d38..7173688 self.base.usage() sys.exit(1) -@@ -1640,10 +2323,18 @@ class YumOptionParser(OptionParser): +@@ -1640,10 +2324,18 @@ class YumOptionParser(OptionParser): sys.exit(1) def getRoot(self,opts): @@ -1984,7 +1992,7 @@ index 6056d38..7173688 if os.access(opts.installroot+'/'+opts.conffile, os.R_OK): opts.conffile = opts.installroot+'/'+opts.conffile elif opts.conffile == '/etc/yum/yum.conf': -@@ -1701,6 +2392,9 @@ class YumOptionParser(OptionParser): +@@ -1701,6 +2393,9 @@ class YumOptionParser(OptionParser): group.add_option("--showduplicates", dest="showdupesfromrepos", action="store_true", help=_("show duplicates, in repos, in list/search commands")) @@ -1994,7 +2002,7 @@ index 6056d38..7173688 group.add_option("-e", "--errorlevel", dest="errorlevel", default=None, help=_("error output level"), type='int', metavar='[error level]') -@@ -1713,6 +2407,10 @@ class YumOptionParser(OptionParser): +@@ -1713,6 +2408,10 @@ class YumOptionParser(OptionParser): help=_("verbose operation")) group.add_option("-y", "--assumeyes", dest="assumeyes", action="store_true", help=_("answer yes for all questions")) @@ -2005,7 +2013,7 @@ index 6056d38..7173688 group.add_option("--version", action="store_true", help=_("show Yum version and exit")) group.add_option("--installroot", help=_("set install root"), -@@ -1730,6 +2428,9 @@ class YumOptionParser(OptionParser): +@@ -1730,6 +2429,9 @@ class YumOptionParser(OptionParser): group.add_option("", "--disableexcludes", default=[], action="append", help=_("disable exclude from main, for a repo or for everything"), metavar='[repo]') @@ -2015,7 +2023,7 @@ index 6056d38..7173688 group.add_option("--obsoletes", action="store_true", help=_("enable obsoletes processing during updates")) group.add_option("--noplugins", action="store_true", -@@ -1748,9 +2449,29 @@ class YumOptionParser(OptionParser): +@@ -1748,9 +2450,29 @@ class YumOptionParser(OptionParser): help=_("control whether color is used")) group.add_option("", "--releasever", dest="releasever", default=None, help=_("set value of $releasever in yum config and repo files")) @@ -186954,7 +186962,7 @@ index c1af4ad..2c2f022 100644 pass diff --git a/yum/__init__.py b/yum/__init__.py -index 99039e0..3b6ed82 100644 +index 99039e0..37ab468 100644 --- a/yum/__init__.py +++ b/yum/__init__.py @@ -21,6 +21,7 @@ The Yum RPM software updater. @@ -188118,7 +188126,7 @@ index 99039e0..3b6ed82 100644 if self.conf.uid != 0: # If we are a user, assume we are using the root cache ... so don't # bother locking. -@@ -1773,39 +2154,38 @@ class YumBase(depsolve.Depsolve): +@@ -1773,39 +2154,39 @@ class YumBase(depsolve.Depsolve): lockfile = os.path.normpath(lockfile) # get rid of silly preceding extra / mypid=str(os.getpid()) @@ -188159,6 +188167,7 @@ index 99039e0..3b6ed82 100644 - raise Errors.LockError(0, msg, oldpid) + continue + if oldpid == os.getpid(): # if we own the lock, we're fine ++ ret = 1 + break + # Another copy seems to be running. + msg = _('Existing lock %s: another copy is running as pid %s.') % (lockfile, oldpid) @@ -188185,7 +188194,7 @@ index 99039e0..3b6ed82 100644 # if we're not root then we don't lock - just return nicely # Note that we can get here from __del__, so if we haven't created # YumBase.conf we don't want to do so here as creating stuff inside -@@ -1830,31 +2210,74 @@ class YumBase(depsolve.Depsolve): +@@ -1830,31 +2211,74 @@ class YumBase(depsolve.Depsolve): self._unlock(lockfile) self._lockfile = None @@ -188272,7 +188281,7 @@ index 99039e0..3b6ed82 100644 failed = False if type(fo) is types.InstanceType: -@@ -1877,10 +2300,10 @@ class YumBase(depsolve.Depsolve): +@@ -1877,10 +2301,10 @@ class YumBase(depsolve.Depsolve): cursize = os.stat(fo)[6] totsize = long(po.size) if cursize >= totsize and not po.repo.cache: @@ -188286,7 +188295,7 @@ index 99039e0..3b6ed82 100644 os.unlink(fo) if raiseError: -@@ -1894,9 +2317,16 @@ class YumBase(depsolve.Depsolve): +@@ -1894,9 +2318,16 @@ class YumBase(depsolve.Depsolve): def verifyChecksum(self, fo, checksumType, csum): @@ -188306,7 +188315,7 @@ index 99039e0..3b6ed82 100644 try: filesum = misc.checksum(checksumType, fo) except Errors.MiscError, e: -@@ -1908,13 +2338,26 @@ class YumBase(depsolve.Depsolve): +@@ -1908,13 +2339,26 @@ class YumBase(depsolve.Depsolve): return 0 def downloadPkgs(self, pkglist, callback=None, callback_total=None): @@ -188334,7 +188343,7 @@ index 99039e0..3b6ed82 100644 if a is None: return -1 if b is None: -@@ -1925,12 +2368,11 @@ class YumBase(depsolve.Depsolve): +@@ -1925,12 +2369,11 @@ class YumBase(depsolve.Depsolve): return 1 return 0 @@ -188349,7 +188358,7 @@ index 99039e0..3b6ed82 100644 # We close the history DB here because some plugins (presto) use # threads. And sqlite really doesn't like threads. And while I don't -@@ -1943,116 +2385,196 @@ class YumBase(depsolve.Depsolve): +@@ -1943,116 +2386,196 @@ class YumBase(depsolve.Depsolve): self.history.close() self.plugins.run('predownload', pkglist=pkglist) @@ -188635,7 +188644,7 @@ index 99039e0..3b6ed82 100644 if type(fo) is types.InstanceType: fo = fo.filename -@@ -2076,9 +2598,12 @@ class YumBase(depsolve.Depsolve): +@@ -2076,9 +2599,12 @@ class YumBase(depsolve.Depsolve): return 1 def downloadHeader(self, po): @@ -188650,7 +188659,7 @@ index 99039e0..3b6ed82 100644 if hasattr(po, 'pkgtype') and po.pkgtype == 'local': return -@@ -2122,15 +2647,17 @@ class YumBase(depsolve.Depsolve): +@@ -2122,15 +2648,17 @@ class YumBase(depsolve.Depsolve): return def sigCheckPkg(self, po): @@ -188676,7 +188685,7 @@ index 99039e0..3b6ed82 100644 if self._override_sigchecks: check = False hasgpgkey = 0 -@@ -2181,6 +2708,9 @@ class YumBase(depsolve.Depsolve): +@@ -2181,6 +2709,9 @@ class YumBase(depsolve.Depsolve): return result, msg def cleanUsedHeadersPackages(self): @@ -188686,7 +188695,7 @@ index 99039e0..3b6ed82 100644 filelist = [] for txmbr in self.tsInfo: if txmbr.po.state not in TS_INSTALL_STATES: -@@ -2189,6 +2719,8 @@ class YumBase(depsolve.Depsolve): +@@ -2189,6 +2720,8 @@ class YumBase(depsolve.Depsolve): continue if txmbr.po.repoid not in self.repos.repos: continue @@ -188695,7 +188704,7 @@ index 99039e0..3b6ed82 100644 # make sure it's not a local file repo = self.repos.repos[txmbr.po.repoid] -@@ -2218,27 +2750,42 @@ class YumBase(depsolve.Depsolve): +@@ -2218,27 +2751,42 @@ class YumBase(depsolve.Depsolve): _('%s removed'), fn) def cleanHeaders(self): @@ -188740,7 +188749,7 @@ index 99039e0..3b6ed82 100644 cachedir = self.conf.persistdir + "/rpmdb-indexes/" if not os.path.exists(cachedir): filelist = [] -@@ -2271,9 +2818,31 @@ class YumBase(depsolve.Depsolve): +@@ -2271,9 +2819,31 @@ class YumBase(depsolve.Depsolve): return 0, [msg] def doPackageLists(self, pkgnarrow='all', patterns=None, showdups=None, @@ -188775,7 +188784,7 @@ index 99039e0..3b6ed82 100644 if showdups is None: showdups = self.conf.showdupesfromrepos ygh = misc.GenericHolder(iter=pkgnarrow) -@@ -2295,6 +2864,8 @@ class YumBase(depsolve.Depsolve): +@@ -2295,6 +2865,8 @@ class YumBase(depsolve.Depsolve): ndinst = {} # Newest versions by name.arch for po in self.rpmdb.returnPackages(patterns=patterns, ignore_case=ic): @@ -188784,7 +188793,7 @@ index 99039e0..3b6ed82 100644 dinst[po.pkgtup] = po if showdups: continue -@@ -2304,8 +2875,13 @@ class YumBase(depsolve.Depsolve): +@@ -2304,8 +2876,13 @@ class YumBase(depsolve.Depsolve): installed = dinst.values() if showdups: @@ -188799,7 +188808,7 @@ index 99039e0..3b6ed82 100644 else: try: avail = self.pkgSack.returnNewestByNameArch(patterns=patterns, -@@ -2323,16 +2899,31 @@ class YumBase(depsolve.Depsolve): +@@ -2323,16 +2900,31 @@ class YumBase(depsolve.Depsolve): key = (pkg.name, pkg.arch) if pkg.pkgtup in dinst: reinstall_available.append(pkg) @@ -188834,7 +188843,7 @@ index 99039e0..3b6ed82 100644 if len(matches) > 1: updates.append(matches[0]) self.verbose_logger.log(logginglevels.DEBUG_1, -@@ -2352,13 +2943,19 @@ class YumBase(depsolve.Depsolve): +@@ -2352,13 +2944,19 @@ class YumBase(depsolve.Depsolve): elif pkgnarrow == 'installed': installed = self.rpmdb.returnPackages(patterns=patterns, ignore_case=ic) @@ -188855,7 +188864,7 @@ index 99039e0..3b6ed82 100644 else: try: avail = self.pkgSack.returnNewestByNameArch(patterns=patterns, -@@ -2392,9 +2989,21 @@ class YumBase(depsolve.Depsolve): +@@ -2392,9 +2990,21 @@ class YumBase(depsolve.Depsolve): avail = set(avail) for po in self.rpmdb.returnPackages(patterns=patterns, ignore_case=ic): @@ -188877,7 +188886,7 @@ index 99039e0..3b6ed82 100644 # obsoleting packages (and what they obsolete) elif pkgnarrow == 'obsoletes': self.conf.obsoletes = 1 -@@ -2402,6 +3011,7 @@ class YumBase(depsolve.Depsolve): +@@ -2402,6 +3012,7 @@ class YumBase(depsolve.Depsolve): for (pkgtup, instTup) in self.up.getObsoletesTuples(): (n,a,e,v,r) = pkgtup pkgs = self.pkgSack.searchNevra(name=n, arch=a, ver=v, rel=r, epoch=e) @@ -188885,7 +188894,7 @@ index 99039e0..3b6ed82 100644 instpo = self.getInstalledPackageObject(instTup) for po in pkgs: obsoletes.append(po) -@@ -2433,7 +3043,12 @@ class YumBase(depsolve.Depsolve): +@@ -2433,7 +3044,12 @@ class YumBase(depsolve.Depsolve): recentlimit = now-(self.conf.recent*86400) if showdups: avail = self.pkgSack.returnPackages(patterns=patterns, @@ -188899,7 +188908,7 @@ index 99039e0..3b6ed82 100644 else: try: avail = self.pkgSack.returnNewestByNameArch(patterns=patterns, -@@ -2461,14 +3076,13 @@ class YumBase(depsolve.Depsolve): +@@ -2461,14 +3077,13 @@ class YumBase(depsolve.Depsolve): def findDeps(self, pkgs): @@ -188919,7 +188928,7 @@ index 99039e0..3b6ed82 100644 results = {} for pkg in pkgs: -@@ -2495,10 +3109,22 @@ class YumBase(depsolve.Depsolve): +@@ -2495,10 +3110,22 @@ class YumBase(depsolve.Depsolve): # pre 3.2.10 API used to always showdups, so that's the default atm. def searchGenerator(self, fields, criteria, showdups=True, keys=False, searchtags=True, searchrpmdb=True): @@ -188946,7 +188955,7 @@ index 99039e0..3b6ed82 100644 sql_fields = [] for f in fields: sql_fields.append(RPM_TO_SQLITE.get(f, f)) -@@ -2614,7 +3240,7 @@ class YumBase(depsolve.Depsolve): +@@ -2614,7 +3241,7 @@ class YumBase(depsolve.Depsolve): # ...but without showdups we want to output _just_ #3, which requires # we find the newest EVR po for the best "matching value". Without keys # it's the same, except we just want the newest EVR. @@ -188955,7 +188964,7 @@ index 99039e0..3b6ed82 100644 # either, so it's pretty thankless. HTH. HAND. # By default just sort using package sorting sort_func = operator.itemgetter(0) -@@ -2661,6 +3287,14 @@ class YumBase(depsolve.Depsolve): +@@ -2661,6 +3288,14 @@ class YumBase(depsolve.Depsolve): yield (po, vs) def searchPackageTags(self, criteria): @@ -188970,7 +188979,7 @@ index 99039e0..3b6ed82 100644 results = {} # name = [(criteria, taglist)] for c in criteria: c = c.lower() -@@ -2677,11 +3311,16 @@ class YumBase(depsolve.Depsolve): +@@ -2677,11 +3312,16 @@ class YumBase(depsolve.Depsolve): return results def searchPackages(self, fields, criteria, callback=None): @@ -188992,7 +189001,7 @@ index 99039e0..3b6ed82 100644 warnings.warn(_('searchPackages() will go away in a future version of Yum.\ Use searchGenerator() instead. \n'), Errors.YumFutureDeprecationWarning, stacklevel=2) -@@ -2700,13 +3339,23 @@ class YumBase(depsolve.Depsolve): +@@ -2700,13 +3340,23 @@ class YumBase(depsolve.Depsolve): def searchPackageProvides(self, args, callback=None, callback_has_matchfor=False): @@ -189020,7 +189029,7 @@ index 99039e0..3b6ed82 100644 else: isglob = True canBeFile = misc.re_filename(arg) -@@ -2723,7 +3372,7 @@ class YumBase(depsolve.Depsolve): +@@ -2723,7 +3373,7 @@ class YumBase(depsolve.Depsolve): where = self.returnPackagesByDep(arg) else: usedDepString = False @@ -189029,7 +189038,7 @@ index 99039e0..3b6ed82 100644 self.verbose_logger.log(logginglevels.DEBUG_1, P_('Searching %d package', 'Searching %d packages', len(where)), len(where)) -@@ -2817,25 +3466,166 @@ class YumBase(depsolve.Depsolve): +@@ -2817,25 +3467,166 @@ class YumBase(depsolve.Depsolve): return matches @@ -189208,7 +189217,7 @@ index 99039e0..3b6ed82 100644 if uservisible: if grp.user_visible: installed.append(grp) -@@ -2847,34 +3637,97 @@ class YumBase(depsolve.Depsolve): +@@ -2847,34 +3638,97 @@ class YumBase(depsolve.Depsolve): available.append(grp) else: available.append(grp) @@ -189314,7 +189323,7 @@ index 99039e0..3b6ed82 100644 thesegroups = self.comps.return_groups(grpid) if not thesegroups: raise Errors.GroupsError, _("No Group named %s exists") % to_unicode(grpid) -@@ -2898,18 +3751,53 @@ class YumBase(depsolve.Depsolve): +@@ -2898,18 +3752,53 @@ class YumBase(depsolve.Depsolve): self.tsInfo.remove(txmbr.po.pkgtup) @@ -189378,7 +189387,7 @@ index 99039e0..3b6ed82 100644 txmbrs_used = [] thesegroups = self.comps.return_groups(grpid) -@@ -2920,12 +3808,18 @@ class YumBase(depsolve.Depsolve): +@@ -2920,12 +3809,18 @@ class YumBase(depsolve.Depsolve): if group_package_types: package_types = group_package_types @@ -189397,7 +189406,7 @@ index 99039e0..3b6ed82 100644 pkgs = [] if 'mandatory' in package_types: pkgs.extend(thisgroup.mandatory_packages) -@@ -2934,12 +3828,56 @@ class YumBase(depsolve.Depsolve): +@@ -2934,12 +3829,56 @@ class YumBase(depsolve.Depsolve): if 'optional' in package_types: pkgs.extend(thisgroup.optional_packages) @@ -189455,7 +189464,7 @@ index 99039e0..3b6ed82 100644 except Errors.InstallError, e: self.verbose_logger.debug(_('No package named %s available to be installed'), pkg) -@@ -2953,7 +3891,9 @@ class YumBase(depsolve.Depsolve): +@@ -2953,7 +3892,9 @@ class YumBase(depsolve.Depsolve): group_conditionals = enable_group_conditionals count_cond_test = 0 @@ -189466,7 +189475,7 @@ index 99039e0..3b6ed82 100644 for condreq, cond in thisgroup.conditional_packages.iteritems(): if self.isPackageInstalled(cond): try: -@@ -2990,17 +3930,23 @@ class YumBase(depsolve.Depsolve): +@@ -2990,17 +3931,23 @@ class YumBase(depsolve.Depsolve): if cond not in self.tsInfo.conditionals: self.tsInfo.conditionals[cond] = [] self.tsInfo.conditionals[cond].extend(pkgs) @@ -189497,7 +189506,7 @@ index 99039e0..3b6ed82 100644 if not self.comps.has_group(grpid): raise Errors.GroupsError, _("No Group named %s exists") % to_unicode(grpid) -@@ -3008,7 +3954,8 @@ class YumBase(depsolve.Depsolve): +@@ -3008,7 +3955,8 @@ class YumBase(depsolve.Depsolve): thesegroups = self.comps.return_groups(grpid) if not thesegroups: raise Errors.GroupsError, _("No Group named %s exists") % to_unicode(grpid) @@ -189507,7 +189516,7 @@ index 99039e0..3b6ed82 100644 for thisgroup in thesegroups: thisgroup.selected = False -@@ -3034,13 +3981,114 @@ class YumBase(depsolve.Depsolve): +@@ -3034,13 +3982,114 @@ class YumBase(depsolve.Depsolve): for pkg in self.tsInfo.conditionals.get(txmbr.name, []): self.tsInfo.remove(pkg.pkgtup) @@ -189628,7 +189637,7 @@ index 99039e0..3b6ed82 100644 # look it up in the self.localPackages first: for po in self.localPackages: if po.pkgtup == pkgtup: -@@ -3049,7 +4097,7 @@ class YumBase(depsolve.Depsolve): +@@ -3049,7 +4098,7 @@ class YumBase(depsolve.Depsolve): pkgs = self.pkgSack.searchPkgTuple(pkgtup) if len(pkgs) == 0: @@ -189637,7 +189646,7 @@ index 99039e0..3b6ed82 100644 if allow_missing: # This can happen due to excludes after .up has return None # happened. raise Errors.DepError, _('Package tuple %s could not be found in packagesack') % str(pkgtup) -@@ -3065,13 +4113,21 @@ class YumBase(depsolve.Depsolve): +@@ -3065,13 +4114,21 @@ class YumBase(depsolve.Depsolve): return result def getInstalledPackageObject(self, pkgtup): @@ -189664,7 +189673,7 @@ index 99039e0..3b6ed82 100644 raise Errors.RpmDBError, _('Package tuple %s could not be found in rpmdb') % str(pkgtup) # Dito. FIXME from getPackageObject() for len() > 1 ... :) -@@ -3079,9 +4135,11 @@ class YumBase(depsolve.Depsolve): +@@ -3079,9 +4136,11 @@ class YumBase(depsolve.Depsolve): return po def gpgKeyCheck(self): @@ -189678,7 +189687,7 @@ index 99039e0..3b6ed82 100644 gpgkeyschecked = self.conf.cachedir + '/.gpgkeyschecked.yum' if os.path.exists(gpgkeyschecked): return 1 -@@ -3106,9 +4164,13 @@ class YumBase(depsolve.Depsolve): +@@ -3106,9 +4165,13 @@ class YumBase(depsolve.Depsolve): return 1 def returnPackagesByDep(self, depstring): @@ -189694,7 +189703,7 @@ index 99039e0..3b6ed82 100644 if not depstring: return [] -@@ -3132,12 +4194,23 @@ class YumBase(depsolve.Depsolve): +@@ -3132,12 +4195,23 @@ class YumBase(depsolve.Depsolve): raise Errors.YumBaseError, _('Invalid version flag from: %s') % str(depstring) depflags = SYMBOLFLAGS[flagsymbol] @@ -189721,7 +189730,7 @@ index 99039e0..3b6ed82 100644 # we get all sorts of randomness here errstring = depstring if type(depstring) not in types.StringTypes: -@@ -3149,16 +4222,22 @@ class YumBase(depsolve.Depsolve): +@@ -3149,16 +4223,22 @@ class YumBase(depsolve.Depsolve): raise Errors.YumBaseError, _('No Package found for %s') % errstring ps = ListPackageSack(pkglist) @@ -189748,7 +189757,7 @@ index 99039e0..3b6ed82 100644 if not depstring: return [] -@@ -3182,14 +4261,53 @@ class YumBase(depsolve.Depsolve): +@@ -3182,14 +4262,53 @@ class YumBase(depsolve.Depsolve): raise Errors.YumBaseError, _('Invalid version flag from: %s') % str(depstring) depflags = SYMBOLFLAGS[flagsymbol] @@ -189804,7 +189813,7 @@ index 99039e0..3b6ed82 100644 if len(pkglist) == 0: -@@ -3198,14 +4316,23 @@ class YumBase(depsolve.Depsolve): +@@ -3198,14 +4317,23 @@ class YumBase(depsolve.Depsolve): if len(pkglist) == 1: return pkglist[0] @@ -189834,7 +189843,7 @@ index 99039e0..3b6ed82 100644 returnlist = [] compatArchList = self.arch.get_arch_list(arch) multiLib = [] -@@ -3222,9 +4349,9 @@ class YumBase(depsolve.Depsolve): +@@ -3222,9 +4350,9 @@ class YumBase(depsolve.Depsolve): singleLib.append(po) # we now have three lists. find the best package(s) of each @@ -189847,7 +189856,7 @@ index 99039e0..3b6ed82 100644 if single_name and multi and single and multi.name != single.name: # Sinlge _must_ match multi, if we want a single package name -@@ -3238,7 +4365,7 @@ class YumBase(depsolve.Depsolve): +@@ -3238,7 +4366,7 @@ class YumBase(depsolve.Depsolve): # if there's a noarch and it's newer than the multilib, we want # just the noarch. otherwise, we want multi + single elif multi: @@ -189856,7 +189865,7 @@ index 99039e0..3b6ed82 100644 if best.arch == "noarch": returnlist.append(no) else: -@@ -3246,7 +4373,7 @@ class YumBase(depsolve.Depsolve): +@@ -3246,7 +4374,7 @@ class YumBase(depsolve.Depsolve): if single: returnlist.append(single) # similar for the non-multilib case elif single: @@ -189865,7 +189874,7 @@ index 99039e0..3b6ed82 100644 if best.arch == "noarch": returnlist.append(no) else: -@@ -3350,28 +4477,71 @@ class YumBase(depsolve.Depsolve): +@@ -3350,28 +4478,71 @@ class YumBase(depsolve.Depsolve): done = True slow = next_func(slow) @@ -189947,7 +189956,7 @@ index 99039e0..3b6ed82 100644 try: txmbrs = self.groupRemove(group_string) except yum.Errors.GroupsError: -@@ -3387,6 +4557,8 @@ class YumBase(depsolve.Depsolve): +@@ -3387,6 +4558,8 @@ class YumBase(depsolve.Depsolve): assert pattern[0] == '@' grpid = pattern[1:] @@ -189956,7 +189965,7 @@ index 99039e0..3b6ed82 100644 thesegroups = self.comps.return_groups(grpid) if not thesegroups: raise Errors.GroupsError, _("No Group named %s exists") % to_unicode(grpid) -@@ -3398,7 +4570,11 @@ class YumBase(depsolve.Depsolve): +@@ -3398,7 +4571,11 @@ class YumBase(depsolve.Depsolve): def _minus_deselect(self, pattern): """ Remove things from the transaction, like kickstart. """ assert pattern[0] == '-' @@ -189969,7 +189978,7 @@ index 99039e0..3b6ed82 100644 if pat and pat[0] == '@': pat = pat[1:] -@@ -3437,14 +4613,87 @@ class YumBase(depsolve.Depsolve): +@@ -3437,14 +4614,87 @@ class YumBase(depsolve.Depsolve): if flag not in self.tsInfo.probFilterFlags: self.tsInfo.probFilterFlags.append(flag) @@ -190063,7 +190072,7 @@ index 99039e0..3b6ed82 100644 pkgs = [] was_pattern = False if po: -@@ -3464,9 +4713,14 @@ class YumBase(depsolve.Depsolve): +@@ -3464,9 +4714,14 @@ class YumBase(depsolve.Depsolve): if kwargs['pattern'] and kwargs['pattern'][0] == '@': return self._at_groupinstall(kwargs['pattern']) @@ -190078,7 +190087,7 @@ index 99039e0..3b6ed82 100644 ignore_case=False) pkgs.extend(mypkgs) # if we have anything left unmatched, let's take a look for it -@@ -3477,20 +4731,14 @@ class YumBase(depsolve.Depsolve): +@@ -3477,20 +4732,14 @@ class YumBase(depsolve.Depsolve): self.verbose_logger.debug(_('Checking for virtual provide or file-provide for %s'), arg) @@ -190107,7 +190116,7 @@ index 99039e0..3b6ed82 100644 else: nevra_dict = self._nevra_kwarg_parse(kwargs) -@@ -3499,6 +4747,8 @@ class YumBase(depsolve.Depsolve): +@@ -3499,6 +4748,8 @@ class YumBase(depsolve.Depsolve): ver=nevra_dict['version'], rel=nevra_dict['release']) self._add_not_found_a(pkgs, nevra_dict) @@ -190116,7 +190125,7 @@ index 99039e0..3b6ed82 100644 if pkgs: # if was_pattern or nevra-dict['arch'] is none, take the list # of arches based on our multilib_compat config and -@@ -3577,17 +4827,21 @@ class YumBase(depsolve.Depsolve): +@@ -3577,17 +4828,21 @@ class YumBase(depsolve.Depsolve): continue # make sure this shouldn't be passed to update: @@ -190142,7 +190151,7 @@ index 99039e0..3b6ed82 100644 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 +4854,23 @@ class YumBase(depsolve.Depsolve): +@@ -3600,23 +4855,23 @@ class YumBase(depsolve.Depsolve): already_obs = pkgs[0] if already_obs: @@ -190173,7 +190182,7 @@ index 99039e0..3b6ed82 100644 continue # make sure we don't have a name.arch of this already installed -@@ -3630,8 +4884,8 @@ class YumBase(depsolve.Depsolve): +@@ -3630,8 +4885,8 @@ class YumBase(depsolve.Depsolve): found = True break if not found: @@ -190184,7 +190193,7 @@ index 99039e0..3b6ed82 100644 tx_return.extend(txmbrs) continue -@@ -3719,19 +4973,47 @@ class YumBase(depsolve.Depsolve): +@@ -3719,19 +4974,47 @@ class YumBase(depsolve.Depsolve): return txmbr def update(self, po=None, requiringPo=None, update_to=False, **kwargs): @@ -190239,7 +190248,7 @@ index 99039e0..3b6ed82 100644 tx_return = [] if not po and not kwargs: # update everything (the easy case) self.verbose_logger.log(logginglevels.DEBUG_2, _('Updating Everything')) -@@ -3765,7 +5047,15 @@ class YumBase(depsolve.Depsolve): +@@ -3765,7 +5048,15 @@ class YumBase(depsolve.Depsolve): if new is None: continue tx_return.extend(self.update(po=new)) @@ -190256,7 +190265,7 @@ index 99039e0..3b6ed82 100644 return tx_return # complications -@@ -3787,13 +5077,16 @@ class YumBase(depsolve.Depsolve): +@@ -3787,13 +5078,16 @@ class YumBase(depsolve.Depsolve): return self._minus_deselect(kwargs['pattern']) if kwargs['pattern'] and kwargs['pattern'][0] == '@': @@ -190275,7 +190284,7 @@ index 99039e0..3b6ed82 100644 if not instpkgs and not availpkgs: depmatches = [] -@@ -3805,6 +5098,8 @@ class YumBase(depsolve.Depsolve): +@@ -3805,6 +5099,8 @@ class YumBase(depsolve.Depsolve): except yum.Errors.YumBaseError, e: self.logger.critical(_('%s') % e) @@ -190284,7 +190293,7 @@ index 99039e0..3b6ed82 100644 if update_to: availpkgs.extend(depmatches) else: -@@ -3816,9 +5111,12 @@ class YumBase(depsolve.Depsolve): +@@ -3816,9 +5112,12 @@ class YumBase(depsolve.Depsolve): try: if update_to: m = [] @@ -190298,7 +190307,7 @@ index 99039e0..3b6ed82 100644 m = self.pkgSack.returnNewestByNameArch(patterns=pats) except Errors.PackageSackError: m = [] -@@ -3843,7 +5141,7 @@ class YumBase(depsolve.Depsolve): +@@ -3843,7 +5142,7 @@ class YumBase(depsolve.Depsolve): availpkgs = self._compare_providers(availpkgs, requiringPo) availpkgs = map(lambda x: x[0], availpkgs) elif not availpkgs: @@ -190307,7 +190316,7 @@ index 99039e0..3b6ed82 100644 # for any thing specified # get the list of available pkgs matching it (or take the po) -@@ -3879,6 +5177,7 @@ class YumBase(depsolve.Depsolve): +@@ -3879,6 +5178,7 @@ class YumBase(depsolve.Depsolve): if obsoleting_pkg is None: continue obs_pkgs.append(obsoleting_pkg) @@ -190315,7 +190324,7 @@ index 99039e0..3b6ed82 100644 for obsoleting_pkg in packagesNewestByName(obs_pkgs): tx_return.extend(self.install(po=obsoleting_pkg)) for available_pkg in availpkgs: -@@ -3920,11 +5219,29 @@ class YumBase(depsolve.Depsolve): +@@ -3920,11 +5220,29 @@ class YumBase(depsolve.Depsolve): tx_return.append(txmbr) for available_pkg in availpkgs: @@ -190345,7 +190354,7 @@ index 99039e0..3b6ed82 100644 self.verbose_logger.log(logginglevels.DEBUG_2, _('Not Updating Package that is obsoleted: %s'), available_pkg) tx_return.extend(self.update(po=obsoleting_pkg)) continue -@@ -3985,11 +5302,18 @@ class YumBase(depsolve.Depsolve): +@@ -3985,11 +5303,18 @@ class YumBase(depsolve.Depsolve): return tx_return def remove(self, po=None, **kwargs): @@ -190369,7 +190378,7 @@ index 99039e0..3b6ed82 100644 if not po and not kwargs: raise Errors.RemoveError, 'Nothing specified to remove' -@@ -4008,6 +5332,10 @@ class YumBase(depsolve.Depsolve): +@@ -4008,6 +5333,10 @@ class YumBase(depsolve.Depsolve): return self._at_groupremove(kwargs['pattern']) (e,m,u) = self.rpmdb.matchPackageNames([kwargs['pattern']]) @@ -190380,7 +190389,7 @@ index 99039e0..3b6ed82 100644 pkgs.extend(e) pkgs.extend(m) if u: -@@ -4018,6 +5346,10 @@ class YumBase(depsolve.Depsolve): +@@ -4018,6 +5347,10 @@ class YumBase(depsolve.Depsolve): except yum.Errors.YumBaseError, e: self.logger.critical(_('%s') % e) @@ -190391,7 +190400,7 @@ index 99039e0..3b6ed82 100644 if not depmatches: arg = to_unicode(arg) self.logger.critical(_('No Match for argument: %s') % to_unicode(arg)) -@@ -4055,17 +5387,19 @@ class YumBase(depsolve.Depsolve): +@@ -4055,17 +5388,19 @@ class YumBase(depsolve.Depsolve): return tx_return def installLocal(self, pkg, po=None, updateonly=False): @@ -190421,7 +190430,7 @@ index 99039e0..3b6ed82 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 +5517,15 @@ class YumBase(depsolve.Depsolve): +@@ -4183,16 +5518,15 @@ class YumBase(depsolve.Depsolve): return tx_return def reinstallLocal(self, pkg, po=None): @@ -190446,7 +190455,7 @@ index 99039e0..3b6ed82 100644 if not po: try: po = YumUrlPackage(self, ts=self.rpmdb.readOnlyTS(), url=pkg, -@@ -4215,13 +5548,29 @@ class YumBase(depsolve.Depsolve): +@@ -4215,13 +5549,29 @@ class YumBase(depsolve.Depsolve): return self.reinstall(po=po) def reinstall(self, po=None, **kwargs): @@ -190479,7 +190488,7 @@ index 99039e0..3b6ed82 100644 tx_mbrs = [] if po: # The po, is the "available" po ... we want the installed po tx_mbrs.extend(self.remove(pkgtup=po.pkgtup)) -@@ -4240,10 +5589,11 @@ class YumBase(depsolve.Depsolve): +@@ -4240,10 +5590,11 @@ class YumBase(depsolve.Depsolve): # pkgs that are obsolete. old_conf_obs = self.conf.obsoletes self.conf.obsoletes = False @@ -190493,7 +190502,7 @@ index 99039e0..3b6ed82 100644 self.conf.obsoletes = old_conf_obs if len(members) == 0: self.tsInfo.remove(item.pkgtup) -@@ -4259,16 +5609,15 @@ class YumBase(depsolve.Depsolve): +@@ -4259,16 +5610,15 @@ class YumBase(depsolve.Depsolve): return tx_mbrs def downgradeLocal(self, pkg, po=None): @@ -190518,7 +190527,7 @@ index 99039e0..3b6ed82 100644 if not po: try: po = YumUrlPackage(self, ts=self.rpmdb.readOnlyTS(), url=pkg, -@@ -4309,13 +5658,19 @@ class YumBase(depsolve.Depsolve): +@@ -4309,13 +5659,19 @@ class YumBase(depsolve.Depsolve): return False def downgrade(self, po=None, **kwargs): @@ -190545,7 +190554,7 @@ index 99039e0..3b6ed82 100644 if not po and not kwargs: raise Errors.DowngradeError, 'Nothing specified to downgrade' -@@ -4397,6 +5752,10 @@ class YumBase(depsolve.Depsolve): +@@ -4397,6 +5753,10 @@ class YumBase(depsolve.Depsolve): # installed version. Indexed fromn the latest installed pkgtup. downgrade_apkgs = {} for pkg in sorted(apkgs): @@ -190556,7 +190565,7 @@ index 99039e0..3b6ed82 100644 na = (pkg.name, pkg.arch) # Here we allow downgrades from .i386 => .noarch, or .i586 => .i386 -@@ -4421,6 +5780,9 @@ class YumBase(depsolve.Depsolve): +@@ -4421,6 +5781,9 @@ class YumBase(depsolve.Depsolve): warned_nas.add(na) continue @@ -190566,7 +190575,7 @@ index 99039e0..3b6ed82 100644 if pkg.verGE(lipkg): if na not in warned_nas: msg = _('Only Upgrade available on package: %s') % pkg -@@ -4457,7 +5819,7 @@ class YumBase(depsolve.Depsolve): +@@ -4457,7 +5820,7 @@ class YumBase(depsolve.Depsolve): if e and v and r: evr = '%s:%s-%s' % (e, v, r) elif v and r: @@ -190575,7 +190584,7 @@ index 99039e0..3b6ed82 100644 elif e and v: evr = '%s:%s' % (e, v) elif v: # e and r etc. is just too weird to print -@@ -4500,12 +5862,24 @@ class YumBase(depsolve.Depsolve): +@@ -4500,12 +5863,24 @@ class YumBase(depsolve.Depsolve): return returndict @@ -190603,7 +190612,7 @@ index 99039e0..3b6ed82 100644 old_conf_obs = self.conf.obsoletes self.conf.obsoletes = False done = False -@@ -4515,19 +5889,46 @@ class YumBase(depsolve.Depsolve): +@@ -4515,19 +5890,46 @@ class YumBase(depsolve.Depsolve): done = True for pkg in transaction.trans_data: if pkg.state == 'Downgrade': @@ -190650,7 +190659,7 @@ index 99039e0..3b6ed82 100644 if self.install(pkgtup=pkg.pkgtup): done = True for pkg in transaction.trans_data: -@@ -4538,8 +5939,14 @@ class YumBase(depsolve.Depsolve): +@@ -4538,8 +5940,14 @@ class YumBase(depsolve.Depsolve): return done def history_undo(self, transaction): @@ -190667,7 +190676,7 @@ index 99039e0..3b6ed82 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 :). -@@ -4616,7 +6023,7 @@ class YumBase(depsolve.Depsolve): +@@ -4616,7 +6024,7 @@ class YumBase(depsolve.Depsolve): except urlgrabber.grabber.URLGrabError, e: raise Errors.YumBaseError(_('GPG key retrieval failed: ') + @@ -190676,7 +190685,7 @@ index 99039e0..3b6ed82 100644 # check for a .asc file accompanying it - that's our gpg sig on the key # suck it down and do the check -@@ -4649,7 +6056,7 @@ class YumBase(depsolve.Depsolve): +@@ -4649,7 +6057,7 @@ class YumBase(depsolve.Depsolve): keys_info = misc.getgpgkeyinfo(rawkey, multiple=True) except ValueError, e: raise Errors.YumBaseError(_('Invalid GPG Key from %s: %s') % @@ -190685,7 +190694,7 @@ index 99039e0..3b6ed82 100644 keys = [] for keyinfo in keys_info: thiskey = {} -@@ -4674,39 +6081,49 @@ class YumBase(depsolve.Depsolve): +@@ -4674,39 +6082,49 @@ class YumBase(depsolve.Depsolve): if pkgs: pkgs = sorted(pkgs)[-1] msg = (_('Importing %s key 0x%s:\n' @@ -190753,7 +190762,7 @@ index 99039e0..3b6ed82 100644 user_cb_fail = False for keyurl in keyurls: keys = self._retrievePublicKey(keyurl, repo) -@@ -4725,7 +6142,9 @@ class YumBase(depsolve.Depsolve): +@@ -4725,7 +6143,9 @@ class YumBase(depsolve.Depsolve): # Try installing/updating GPG key self._getKeyImportMessage(info, keyurl) rc = False @@ -190764,7 +190773,7 @@ index 99039e0..3b6ed82 100644 rc = True # grab the .sig/.asc for the keyurl, if it exists -@@ -4751,8 +6170,8 @@ class YumBase(depsolve.Depsolve): +@@ -4751,8 +6171,8 @@ class YumBase(depsolve.Depsolve): ts = self.rpmdb.readOnlyTS() result = ts.pgpImportPubkey(misc.procgpgkey(info['raw_key'])) if result != 0: @@ -190775,7 +190784,7 @@ index 99039e0..3b6ed82 100644 self.logger.info(_('Key imported successfully')) key_installed = True -@@ -4760,18 +6179,20 @@ class YumBase(depsolve.Depsolve): +@@ -4760,18 +6180,20 @@ class YumBase(depsolve.Depsolve): raise Errors.YumBaseError, _("Didn't install any keys") if not key_installed: @@ -190801,7 +190810,7 @@ index 99039e0..3b6ed82 100644 def _getAnyKeyForRepo(self, repo, destdir, keyurl_list, is_cakey=False, callback=None): """ -@@ -4788,6 +6209,18 @@ class YumBase(depsolve.Depsolve): +@@ -4788,6 +6210,18 @@ class YumBase(depsolve.Depsolve): """ key_installed = False @@ -190820,7 +190829,7 @@ index 99039e0..3b6ed82 100644 user_cb_fail = False for keyurl in keyurl_list: keys = self._retrievePublicKey(keyurl, repo, getSig=not is_cakey) -@@ -4819,8 +6252,11 @@ class YumBase(depsolve.Depsolve): +@@ -4819,8 +6253,11 @@ class YumBase(depsolve.Depsolve): if not key_installed: self._getKeyImportMessage(info, keyurl, keytype) rc = False @@ -190833,7 +190842,7 @@ index 99039e0..3b6ed82 100644 elif callback: rc = callback({"repo": repo, "userid": info['userid'], "hexkeyid": info['hexkeyid'], "keyurl": keyurl, -@@ -4835,7 +6271,8 @@ class YumBase(depsolve.Depsolve): +@@ -4835,7 +6272,8 @@ class YumBase(depsolve.Depsolve): # Import the key result = misc.import_key_to_pubring(info['raw_key'], info['hexkeyid'], gpgdir=destdir) if not result: @@ -190843,7 +190852,7 @@ index 99039e0..3b6ed82 100644 self.logger.info(_('Key imported successfully')) key_installed = True # write out the key id to imported_cakeys in the repos basedir -@@ -4851,36 +6288,35 @@ class YumBase(depsolve.Depsolve): +@@ -4851,36 +6289,35 @@ class YumBase(depsolve.Depsolve): pass if not key_installed and user_cb_fail: @@ -190896,7 +190905,7 @@ index 99039e0..3b6ed82 100644 self._getAnyKeyForRepo(repo, repo.gpgcadir, repo.gpgcakey, is_cakey=True, callback=callback) def _limit_installonly_pkgs(self): -@@ -4889,7 +6325,7 @@ class YumBase(depsolve.Depsolve): +@@ -4889,7 +6326,7 @@ class YumBase(depsolve.Depsolve): New in 3.2.24: Obey yumdb_info.installonly data. """ def _sort_and_filter_installonly(pkgs): @@ -190905,7 +190914,7 @@ index 99039e0..3b6ed82 100644 using the yumdb. """ ret_beg = [] ret_mid = [] -@@ -4917,6 +6353,10 @@ class YumBase(depsolve.Depsolve): +@@ -4917,6 +6354,10 @@ class YumBase(depsolve.Depsolve): if self.conf.installonly_limit < 1 : return @@ -190916,7 +190925,7 @@ index 99039e0..3b6ed82 100644 toremove = [] # We "probably" want to use either self.ts or self.rpmdb.ts if either -@@ -4926,23 +6366,30 @@ class YumBase(depsolve.Depsolve): +@@ -4926,23 +6367,30 @@ class YumBase(depsolve.Depsolve): # so self.rpmdb.ts should be valid. ts = self.rpmdb.readOnlyTS() (cur_kernel_v, cur_kernel_r) = misc.get_running_kernel_version_release(ts) @@ -190955,7 +190964,7 @@ index 99039e0..3b6ed82 100644 for po in installed: if (po.version, po.release) == (cur_kernel_v, cur_kernel_r): # don't remove running -@@ -4959,19 +6406,22 @@ class YumBase(depsolve.Depsolve): +@@ -4959,19 +6407,22 @@ class YumBase(depsolve.Depsolve): txmbr.depends_on.append(rel) def processTransaction(self, callback=None,rpmTestDisplay=None, rpmDisplay=None): @@ -190991,7 +191000,7 @@ index 99039e0..3b6ed82 100644 if not callback: callback = callbacks.ProcessTransNoOutputCallback() -@@ -5062,8 +6512,8 @@ class YumBase(depsolve.Depsolve): +@@ -5062,8 +6513,8 @@ class YumBase(depsolve.Depsolve): raise Errors.YumRPMCheckError, retmsgs retmsgs = [_('ERROR with transaction check vs depsolve:')] retmsgs.extend(msgs) @@ -191002,7 +191011,7 @@ index 99039e0..3b6ed82 100644 raise Errors.YumRPMCheckError,retmsgs tsConf = {} -@@ -5114,13 +6564,19 @@ class YumBase(depsolve.Depsolve): +@@ -5114,13 +6565,19 @@ class YumBase(depsolve.Depsolve): return results def add_enable_repo(self, repoid, baseurls=[], mirrorlist=None, **kwargs): @@ -191029,7 +191038,7 @@ index 99039e0..3b6ed82 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 +6623,15 @@ class YumBase(depsolve.Depsolve): +@@ -5167,9 +6624,15 @@ class YumBase(depsolve.Depsolve): def setCacheDir(self, force=False, tmpdir=None, reuse=True, suffix='/$basearch/$releasever'): @@ -191048,7 +191057,7 @@ index 99039e0..3b6ed82 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: -@@ -5179,7 +6641,7 @@ class YumBase(depsolve.Depsolve): +@@ -5179,7 +6642,7 @@ class YumBase(depsolve.Depsolve): try: cachedir = misc.getCacheDir(tmpdir, reuse) except (IOError, OSError), e: @@ -191057,7 +191066,7 @@ index 99039e0..3b6ed82 100644 cachedir = None if cachedir is None: -@@ -5190,6 +6652,8 @@ class YumBase(depsolve.Depsolve): +@@ -5190,6 +6653,8 @@ class YumBase(depsolve.Depsolve): self.prerepoconf.cachedir = cachedir else: self.repos.setCacheDir(cachedir) @@ -191066,7 +191075,7 @@ index 99039e0..3b6ed82 100644 self.conf.cachedir = cachedir return True # We got a new cache dir -@@ -5220,13 +6684,24 @@ class YumBase(depsolve.Depsolve): +@@ -5220,13 +6685,24 @@ class YumBase(depsolve.Depsolve): self.history.write_addon_data('config-repos', myrepos) def verify_plugins_cb(self, verify_package): @@ -191094,7 +191103,7 @@ index 99039e0..3b6ed82 100644 if self.tsInfo._unresolvedMembers: if auto: self.logger.critical(_("Dependencies not solved. Will not save unresolved transaction.")) -@@ -5234,7 +6709,7 @@ class YumBase(depsolve.Depsolve): +@@ -5234,7 +6710,7 @@ class YumBase(depsolve.Depsolve): raise Errors.YumBaseError(_("Dependencies not solved. Will not save unresolved transaction.")) if not filename: @@ -191103,7 +191112,7 @@ index 99039e0..3b6ed82 100644 fd,filename = tempfile.mkstemp(suffix='.yumtx', prefix=prefix) f = os.fdopen(fd, 'w') else: -@@ -5244,13 +6719,17 @@ class YumBase(depsolve.Depsolve): +@@ -5244,13 +6720,17 @@ class YumBase(depsolve.Depsolve): msg = "%s\n" % self.rpmdb.simpleVersion(main_only=True)[0] msg += "%s\n" % self.ts.getTsFlags() @@ -191124,7 +191133,7 @@ index 99039e0..3b6ed82 100644 msg += "%s\n" % len(self.tsInfo.getMembers()) for txmbr in self.tsInfo.getMembers(): msg += txmbr._dump() -@@ -5260,42 +6739,84 @@ class YumBase(depsolve.Depsolve): +@@ -5260,42 +6740,84 @@ class YumBase(depsolve.Depsolve): except (IOError, OSError), e: self._ts_save_file = None if auto: @@ -191221,7 +191230,7 @@ index 99039e0..3b6ed82 100644 if ignorerpm: msg += _(" ignoring, as requested.") self.logger.critical(_(msg)) -@@ -5318,8 +6839,17 @@ class YumBase(depsolve.Depsolve): +@@ -5318,8 +6840,17 @@ class YumBase(depsolve.Depsolve): numrepos = int(data[2].strip()) repos = [] rindex=3+numrepos @@ -191240,7 +191249,7 @@ index 99039e0..3b6ed82 100644 # pkgs/txmbrs numpkgs = int(data[rindex].strip()) -@@ -5329,6 +6859,7 @@ class YumBase(depsolve.Depsolve): +@@ -5329,6 +6860,7 @@ class YumBase(depsolve.Depsolve): pkgcount = 0 pkgprob = False curpkg = None @@ -191248,7 +191257,7 @@ index 99039e0..3b6ed82 100644 for l in data[pkgstart:]: l = l.rstrip() # our main txmbrs -@@ -5356,6 +6887,7 @@ class YumBase(depsolve.Depsolve): +@@ -5356,6 +6888,7 @@ class YumBase(depsolve.Depsolve): if not ignoremissing: raise Errors.YumBaseError(msg) else: @@ -191256,7 +191265,7 @@ index 99039e0..3b6ed82 100644 self.logger.critical(msg) else: pkgcount += 1 -@@ -5432,12 +6964,18 @@ class YumBase(depsolve.Depsolve): +@@ -5432,12 +6965,18 @@ class YumBase(depsolve.Depsolve): if pkgprob: msg = _("Transaction members, relations are missing or ts has been modified,") if ignoremissing: @@ -191275,7 +191284,7 @@ index 99039e0..3b6ed82 100644 return self.tsInfo.getMembers() def _remove_old_deps(self): -@@ -5470,18 +7008,6 @@ class YumBase(depsolve.Depsolve): +@@ -5470,18 +7009,6 @@ class YumBase(depsolve.Depsolve): if requiring == required: # if they are self-requiring skip them continue @@ -191294,7 +191303,7 @@ index 99039e0..3b6ed82 100644 #for tbi_pkg in self.tsInfo.getMembersWithState(output_states=TS_INSTALL_STATES): # for reqtuple in tbi_pkg.po.requires: # if required.provides_for(reqtuple): -@@ -5533,7 +7059,24 @@ class YumBase(depsolve.Depsolve): +@@ -5533,7 +7060,24 @@ class YumBase(depsolve.Depsolve): # Debugging output self.verbose_logger.log(logginglevels.DEBUG_2, _("%s has revdep %s which was user-installed."), pkg, curpkg) ok_to_remove[pkg] = False @@ -191319,7 +191328,7 @@ index 99039e0..3b6ed82 100644 visited[curpkg] = True all_leaves_visited = True leaves = curpkg.requiring_packages() -@@ -5547,4 +7090,3 @@ class YumBase(depsolve.Depsolve): +@@ -5547,4 +7091,3 @@ class YumBase(depsolve.Depsolve): # Debugging output self.verbose_logger.log(logginglevels.DEBUG_2, _("%s has no user-installed revdeps."), pkg) return False @@ -200331,7 +200340,7 @@ index e5e9ece..35359e2 100644 fo = None diff --git a/yumcommands.py b/yumcommands.py -index 4dcbea7..4e3b730 100644 +index 4dcbea7..52b8c90 100644 --- a/yumcommands.py +++ b/yumcommands.py @@ -13,6 +13,7 @@ @@ -200991,7 +201000,7 @@ index 4dcbea7..4e3b730 100644 else: rop = base.listPkgs(ypl.obsoletes, _('Obsoleting Packages'), basecmd, columns=columns) -@@ -389,45 +725,160 @@ class InfoCommand(YumCommand): +@@ -389,65 +725,212 @@ class InfoCommand(YumCommand): return 0, [] def needTs(self, base, basecmd, extcmds): @@ -201058,9 +201067,8 @@ index 4dcbea7..4e3b730 100644 + + :return: a list containing the names of this command + """ -+ return ['erase', 'remove', 'autoremove', ++ return ['erase', 'remove', + 'erase-n', 'erase-na', 'erase-nevra', -+ 'autoremove-n', 'autoremove-na', 'autoremove-nevra', + 'remove-n', 'remove-na', 'remove-nevra'] def getUsage(self): @@ -201156,8 +201164,29 @@ index 4dcbea7..4e3b730 100644 + """ return True ++ ++class AutoremoveCommand(EraseCommand): ++ """A class containing methods needed by the cli to execute the ++ autremove command. ++ """ ++ def getNames(self): ++ """Return a list containing the names of this command. This ++ command can be called from the command line by using any of these names. ++ ++ :return: a list containing the names of this command ++ """ ++ return [ 'autoremove', 'autoremove-n', 'autoremove-na', 'autoremove-nevra'] ++ ++ def getSummary(self): ++ """Return a one line summary of this command. ++ ++ :return: a one line summary of this command ++ """ ++ return _("Remove leaf packages") ++ -@@ -436,18 +887,31 @@ class GroupsCommand(YumCommand): + class GroupsCommand(YumCommand): + """ Single sub-command interface for most groups interaction. """ direct_commands = {'grouplist' : 'list', 'groupinstall' : 'install', @@ -201190,7 +201219,7 @@ index 4dcbea7..4e3b730 100644 return _("Display, or use, the groups information") def _grp_setup_doCommand(self, base): -@@ -459,7 +923,7 @@ class GroupsCommand(YumCommand): +@@ -459,7 +942,7 @@ class GroupsCommand(YumCommand): except yum.Errors.GroupsError: return 1, [_('No Groups on which to run command')] except yum.Errors.YumBaseError, e: @@ -201199,7 +201228,7 @@ index 4dcbea7..4e3b730 100644 def _grp_cmd(self, basecmd, extcmds): if basecmd in self.direct_commands: -@@ -470,6 +934,10 @@ class GroupsCommand(YumCommand): +@@ -470,6 +953,10 @@ class GroupsCommand(YumCommand): else: cmd = 'summary' @@ -201210,7 +201239,7 @@ index 4dcbea7..4e3b730 100644 remap = {'update' : 'upgrade', 'erase' : 'remove', 'mark-erase' : 'mark-remove', -@@ -479,32 +947,86 @@ class GroupsCommand(YumCommand): +@@ -479,32 +966,86 @@ class GroupsCommand(YumCommand): return cmd, extcmds def doCheck(self, base, basecmd, extcmds): @@ -201307,7 +201336,7 @@ index 4dcbea7..4e3b730 100644 cmd, extcmds = self._grp_cmd(basecmd, extcmds) self._grp_setup_doCommand(base) -@@ -514,140 +1036,573 @@ class GroupsCommand(YumCommand): +@@ -514,140 +1055,573 @@ class GroupsCommand(YumCommand): if cmd == 'list': return base.returnGroupLists(extcmds) @@ -201756,13 +201785,9 @@ index 4dcbea7..4e3b730 100644 + """ return False --class ProvidesCommand(YumCommand): -- def getNames(self): -- return ['provides', 'whatprovides'] + def cacheRequirement(self, base, basecmd, extcmds): + """Return the cache requirements for the remote repos. - -- def getUsage(self): ++ + :param base: a :class:`yum.Yumbase` object + :param basecmd: the name of the command + :param extcmds: a list of arguments passed to *basecmd* @@ -201771,20 +201796,20 @@ index 4dcbea7..4e3b730 100644 + return 'read-only:past' + + -+class ProvidesCommand(YumCommand): + class ProvidesCommand(YumCommand): + """A class containing methods needed by the cli to execute the + provides command. + """ + -+ def getNames(self): + def getNames(self): + """Return a list containing the names of this command. This + command can be called from the command line by using any of these names. + + :return: a list containing the names of this command + """ -+ return ['provides', 'whatprovides'] -+ -+ def getUsage(self): + return ['provides', 'whatprovides'] + + def getUsage(self): + """Return a usage string for this command. + + :return: a usage string for this command @@ -201910,7 +201935,7 @@ index 4dcbea7..4e3b730 100644 ypl.obsoletes = typl.obsoletes ypl.obsoletesTuples = typl.obsoletesTuples -@@ -673,164 +1628,474 @@ class CheckUpdateCommand(YumCommand): +@@ -673,164 +1647,474 @@ class CheckUpdateCommand(YumCommand): for obtup in sorted(ypl.obsoletesTuples, key=operator.itemgetter(0)): base.updatesObsoletesList(obtup, 'obsoletes', @@ -202416,7 +202441,7 @@ index 4dcbea7..4e3b730 100644 def _repo_size(repo): ret = 0 for pkg in repo.sack.returnPackages(): -@@ -838,12 +2103,9 @@ class RepoListCommand(YumCommand): +@@ -838,12 +2122,9 @@ class RepoListCommand(YumCommand): return base.format_number(ret) def _repo_match(repo, patterns): @@ -202431,7 +202456,7 @@ index 4dcbea7..4e3b730 100644 return True return False -@@ -857,7 +2119,10 @@ class RepoListCommand(YumCommand): +@@ -857,7 +2138,10 @@ class RepoListCommand(YumCommand): arg = 'enabled' extcmds = map(lambda x: x.lower(), extcmds) @@ -202443,7 +202468,7 @@ index 4dcbea7..4e3b730 100644 if arg != 'disabled' or extcmds: try: # Setup so len(repo.sack) is correct -@@ -866,6 +2131,13 @@ class RepoListCommand(YumCommand): +@@ -866,6 +2150,13 @@ class RepoListCommand(YumCommand): except yum.Errors.RepoError: if verbose: raise @@ -202457,7 +202482,7 @@ index 4dcbea7..4e3b730 100644 repos = base.repos.repos.values() repos.sort() -@@ -924,111 +2196,113 @@ class RepoListCommand(YumCommand): +@@ -924,111 +2215,113 @@ class RepoListCommand(YumCommand): ui_enabled = dhibeg + _('disabled') + hiend ui_endis_wid = utf8_width(_('disabled')) @@ -202667,7 +202692,7 @@ index 4dcbea7..4e3b730 100644 if not verbose and cols: # Work out the first (id) and last (enabled/disalbed/count), -@@ -1088,21 +2362,64 @@ class RepoListCommand(YumCommand): +@@ -1088,21 +2381,64 @@ class RepoListCommand(YumCommand): return 0, ['repolist: ' +to_unicode(locale.format("%d", tot_num, True))] def needTs(self, base, basecmd, extcmds): @@ -202732,7 +202757,7 @@ index 4dcbea7..4e3b730 100644 if len(extcmds) == 0: base.usage() raise cli.CliError -@@ -1147,82 +2464,230 @@ class HelpCommand(YumCommand): +@@ -1147,82 +2483,230 @@ class HelpCommand(YumCommand): return help_output def doCommand(self, base, basecmd, extcmds): @@ -202923,20 +202948,20 @@ index 4dcbea7..4e3b730 100644 + """ + def getNames(self): +- return ['version'] + """Return a list containing the names of this command. This + command can be called from the command line by using any of these names. + + :return: a list containing the names of this command + """ - return ['version'] ++ return ['version'] def getUsage(self): -- return "[all|installed|available]" + """Return a usage string for this command. + + :return: a usage string for this command + """ -+ return "[all|installed|available]" + return "[all|installed|available]" def getSummary(self): + """Return a one line summary of this command. @@ -202973,7 +202998,7 @@ index 4dcbea7..4e3b730 100644 def _append_repos(cols, repo_data): for repoid in sorted(repo_data): -@@ -1264,7 +2729,7 @@ class VersionCommand(YumCommand): +@@ -1264,7 +2748,7 @@ class VersionCommand(YumCommand): if vcmd == 'groupinfo': for group in groups: @@ -202982,7 +203007,7 @@ index 4dcbea7..4e3b730 100644 continue print _(" Group :"), group print _(" Packages:") -@@ -1284,11 +2749,35 @@ class VersionCommand(YumCommand): +@@ -1284,11 +2768,35 @@ class VersionCommand(YumCommand): return 0, ['version groupinfo'] @@ -203019,7 +203044,7 @@ index 4dcbea7..4e3b730 100644 data = base.rpmdb.simpleVersion(not verbose, groups=groups) lastdbv = base.history.last() if lastdbv is not None: -@@ -1302,15 +2791,14 @@ class VersionCommand(YumCommand): +@@ -1302,15 +2810,14 @@ class VersionCommand(YumCommand): if groups: for grp in sorted(data[2]): if (vcmd.startswith("group-") and @@ -203038,7 +203063,7 @@ index 4dcbea7..4e3b730 100644 data = base.pkgSack.simpleVersion(not verbose, groups=groups) if vcmd not in ('group-available', 'group-all'): cols.append(("%s %s/%s" % (_("Available:"), rel, ba), -@@ -1320,14 +2808,12 @@ class VersionCommand(YumCommand): +@@ -1320,14 +2827,12 @@ class VersionCommand(YumCommand): if groups: for grp in sorted(data[2]): if (vcmd.startswith("group-") and @@ -203054,7 +203079,7 @@ index 4dcbea7..4e3b730 100644 data = {'rid' : {}, 'ver' : {}} for (rid, ver) in cols: -@@ -1344,6 +2830,14 @@ class VersionCommand(YumCommand): +@@ -1344,6 +2849,14 @@ class VersionCommand(YumCommand): return 0, ['version'] def needTs(self, base, basecmd, extcmds): @@ -203069,7 +203094,7 @@ index 4dcbea7..4e3b730 100644 vcmd = 'installed' if extcmds: vcmd = extcmds[0] -@@ -1352,25 +2846,74 @@ class VersionCommand(YumCommand): +@@ -1352,25 +2865,74 @@ class VersionCommand(YumCommand): return True return vcmd in ('available', 'all', 'group-available', 'group-all') @@ -203145,7 +203170,7 @@ index 4dcbea7..4e3b730 100644 return 2, ["Repeating transaction %u" % (old.tid,)] def _hcmd_undo(self, base, extcmds): -@@ -1426,12 +2969,60 @@ class HistoryCommand(YumCommand): +@@ -1426,12 +2988,60 @@ class HistoryCommand(YumCommand): def _hcmd_new(self, base, extcmds): base.history._create_db_file() @@ -203207,7 +203232,7 @@ index 4dcbea7..4e3b730 100644 if extcmds and extcmds[0] not in cmds: base.logger.critical(_('Invalid history sub-command, use: %s.'), ", ".join(cmds)) -@@ -1444,6 +3035,19 @@ class HistoryCommand(YumCommand): +@@ -1444,6 +3054,19 @@ class HistoryCommand(YumCommand): raise cli.CliError def doCommand(self, base, basecmd, extcmds): @@ -203227,7 +203252,7 @@ index 4dcbea7..4e3b730 100644 vcmd = 'list' if extcmds: vcmd = extcmds[0] -@@ -1468,29 +3072,88 @@ class HistoryCommand(YumCommand): +@@ -1468,29 +3091,88 @@ class HistoryCommand(YumCommand): ret = self._hcmd_rollback(base, extcmds) elif vcmd == 'new': ret = self._hcmd_new(base, extcmds) @@ -203316,7 +203341,7 @@ index 4dcbea7..4e3b730 100644 chkcmd = 'all' if extcmds: chkcmd = extcmds -@@ -1505,33 +3168,1694 @@ class CheckRpmdbCommand(YumCommand): +@@ -1505,33 +3187,1694 @@ class CheckRpmdbCommand(YumCommand): return rc, ['%s %s' % (basecmd, chkcmd)] def needTs(self, base, basecmd, extcmds): @@ -203510,8 +203535,8 @@ index 4dcbea7..4e3b730 100644 + if not extcmds or os.path.isdir(extcmds[0]): + return False + -+ return True -+ + return True + + def cacheRequirement(self, base, basecmd, extcmds): + """Return the cache requirements for the remote repos. + @@ -203909,8 +203934,8 @@ index 4dcbea7..4e3b730 100644 + if cmd in ('info', 'list'): + return InfoCommand().needTs(base, cmd, extcmds[2:]) + - return True - ++ return True ++ + def cacheRequirement(self, base, basecmd, extcmds): + """Return the cache requirements for the remote repos. + diff --git a/yum.spec b/yum.spec index 1c9a26f..479eb92 100644 --- a/yum.spec +++ b/yum.spec @@ -64,7 +64,7 @@ BuildRequires: bash-completion Summary: RPM package installer/updater/manager Name: yum Version: 3.4.3 -Release: 136%{?dist} +Release: 137%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz @@ -503,6 +503,11 @@ exit 0 %endif %changelog +* Mon Feb 17 2014 Valentina Mukhamedzhanova - 3.4.3-137 +- update to latest HEAD +- Fix debuginfo-install doLock() traceback. BZ 1062479 +- Add 'autoremove' to yum --help output. BZ 1053348 + * Fri Feb 14 2014 James Antill - 3.4.3-136 - update to latest HEAD - Minor fixes/cleanups for yum fs diff.