[yum] Fix cacheReq manipulation overwrite.
James Antill
james at fedoraproject.org
Fri Dec 6 20:22:02 UTC 2013
commit 92e668f9c8143dcc5fd1220f1eaaca98cb1b15f3
Author: James Antill <james at and.org>
Date: Fri Dec 6 15:21:56 2013 -0500
Fix cacheReq manipulation overwrite.
- Only look at enabled repos. for cacheReq cookie comparisons. BZ 1039028.
- Add check-update sub-command to repo-pkgs.
- Add command variation aliases to check-update.
- Fix needTs check with repo-pkgs list/info.
yum-HEAD.patch | 272 +++++++++++++++++++++++++++++++-------------------------
yum.spec | 9 ++-
2 files changed, 160 insertions(+), 121 deletions(-)
---
diff --git a/yum-HEAD.patch b/yum-HEAD.patch
index d2e5114..2cc52b6 100644
--- a/yum-HEAD.patch
+++ b/yum-HEAD.patch
@@ -107,7 +107,7 @@ index 2f6154e..2e5a052 100644
diff --git a/cli.py b/cli.py
old mode 100644
new mode 100755
-index 6056d38..7f6643f
+index 6056d38..180ba99
--- a/cli.py
+++ b/cli.py
@@ -25,7 +25,7 @@ import sys
@@ -322,10 +322,17 @@ index 6056d38..7f6643f
self.verbose_logger.log(yum.logginglevels.DEBUG_4,
'COMMAND: %s', self.cmdstring)
self.verbose_logger.log(yum.logginglevels.DEBUG_4,
-@@ -349,6 +390,50 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -349,8 +390,57 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self.basecmd, sys.argv[0])
raise CliError
++ self._set_repos_cache_req()
++
+ self.yum_cli_commands[self.basecmd].doCheck(self, self.basecmd, self.extcmds)
+
++ def _set_repos_cache_req(self, warning=True):
++ """ Set the cacheReq attribute from the commands to the repos. """
++
+ cmd = self.yum_cli_commands[self.basecmd]
+ cacheReq = 'write'
+ if hasattr(cmd, 'cacheRequirement'):
@@ -340,7 +347,7 @@ index 6056d38..7f6643f
+ # they are _really_ old.
+ ts_min = None
+ ts_max = None
-+ for repo in self.repos.sort():
++ for repo in self.repos.listEnabled():
+ if not os.path.exists(repo.metadata_cookie):
+ ts_min = None
+ break
@@ -364,16 +371,16 @@ index 6056d38..7f6643f
+
+ if not ts_min:
+ cacheReq = 'write'
-+ elif (time.time() - ts_max) > (60 * 60 * 24 * 14):
++ elif warning and (time.time() - ts_max) > (60 * 60 * 24 * 14):
+ self.logger.warning(_("Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast"))
+
+ for repo in self.repos.sort():
+ repo._metadata_cache_req = cacheReq
+
- self.yum_cli_commands[self.basecmd].doCheck(self, self.basecmd, self.extcmds)
-
def _shell_history_write(self):
-@@ -365,7 +450,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+ if not hasattr(self, '_shell_history_cmds'):
+ return
+@@ -365,7 +455,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self.history.write_addon_data('shell-cmds', data)
def doShell(self):
@@ -386,7 +393,7 @@ index 6056d38..7f6643f
yumshell = shell.YumShell(base=self)
-@@ -382,8 +471,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -382,8 +476,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return yumshell.result, yumshell.resultmsgs
def errorSummary(self, errstring):
@@ -401,18 +408,12 @@ index 6056d38..7f6643f
summary = ''
# do disk space report first
p = re.compile('needs (\d+)MB on the (\S+) filesystem')
-@@ -407,17 +500,45 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -407,17 +505,45 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return summary
- def doCommands(self):
-+ def waitForLock(self):
-+ """Establish the yum lock. If another process is already
-+ holding the yum lock, by default this method will keep trying
-+ to establish the lock until it is successful. However, if
-+ :attr:`self.conf.exit_on_lock` is set to True, it will
-+ raise a :class:`Errors.YumBaseError`.
- """
+- """
- Calls the base command passes the extended commands/args out to be
- parsed (most notably package globs).
-
@@ -420,7 +421,13 @@ index 6056d38..7f6643f
- - 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
-- """
++ def waitForLock(self):
++ """Establish the yum lock. If another process is already
++ holding the yum lock, by default this method will keep trying
++ to establish the lock until it is successful. However, if
++ :attr:`self.conf.exit_on_lock` is set to True, it will
++ raise a :class:`Errors.YumBaseError`.
+ """
-
+ lockerr = ""
+ while True:
@@ -457,7 +464,7 @@ index 6056d38..7f6643f
# 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 +556,41 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -435,14 +561,37 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
try:
self._getTs(needTsRemove)
except yum.Errors.YumBaseError, e:
@@ -466,11 +473,7 @@ index 6056d38..7f6643f
+
+ # This should already have been done at doCheck() time, but just in
+ # case repos. got added or something do it again.
-+ cacheReq = 'write'
-+ if hasattr(cmd, 'cacheRequirement'):
-+ cacheReq = cmd.cacheRequirement(self, self.basecmd, self.extcmds)
-+ for repo in self.repos.sort():
-+ repo._metadata_cache_req = cacheReq
++ self._set_repos_cache_req(warning=False)
return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
@@ -503,7 +506,7 @@ index 6056d38..7f6643f
# 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 +601,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -453,7 +602,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)
@@ -512,7 +515,7 @@ index 6056d38..7f6643f
# 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 +611,6 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -463,7 +612,6 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
rmpkgs = []
stuff_to_download = False
install_only = True
@@ -520,7 +523,7 @@ index 6056d38..7f6643f
for txmbr in self.tsInfo.getMembers():
if txmbr.ts_state not in ('i', 'u'):
install_only = False
-@@ -471,7 +618,6 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -471,7 +619,6 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
if po:
rmpkgs.append(po)
else:
@@ -528,7 +531,7 @@ index 6056d38..7f6643f
stuff_to_download = True
po = txmbr.po
if po:
-@@ -489,19 +635,40 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -489,19 +636,40 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
else:
self.reportDownloadSize(downloadpkgs, install_only)
@@ -574,7 +577,7 @@ index 6056d38..7f6643f
for key in problems:
errors = yum.misc.unique(problems[key])
for error in errors:
-@@ -520,8 +687,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -520,8 +688,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
rcd_st = time.time()
self.verbose_logger.log(yum.logginglevels.INFO_2,
@@ -585,7 +588,7 @@ index 6056d38..7f6643f
if msgs:
rpmlib_only = True
for msg in msgs:
-@@ -532,21 +700,23 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -532,21 +701,23 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
print _("ERROR You need to update rpm to handle:")
else:
print _('ERROR with transaction check vs depsolve:')
@@ -614,7 +617,7 @@ index 6056d38..7f6643f
self.ts.order() # order the transaction
self.ts.clean() # release memory not needed beyond this point
-@@ -556,16 +726,16 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -556,16 +727,16 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
del testcb
if len(tserrors) > 0:
@@ -634,7 +637,7 @@ index 6056d38..7f6643f
# unset the sigquit handler
signal.signal(signal.SIGQUIT, signal.SIG_DFL)
-@@ -595,7 +765,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -595,7 +766,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
if self.conf.debuglevel < 2:
cb.display.output = False
@@ -643,7 +646,7 @@ index 6056d38..7f6643f
resultobject = self.runTransaction(cb=cb)
self.verbose_logger.debug('Transaction time: %0.3f' % (time.time() - ts_st))
-@@ -609,12 +779,14 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -609,12 +780,14 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return resultobject.return_code
def gpgsigcheck(self, pkgs):
@@ -663,7 +666,7 @@ index 6056d38..7f6643f
for po in pkgs:
result, errmsg = self.sigCheckPkg(po)
-@@ -623,7 +795,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -623,7 +796,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
continue
elif result == 1:
@@ -673,7 +676,7 @@ index 6056d38..7f6643f
raise yum.Errors.YumBaseError, \
_('Refusing to automatically import keys when running ' \
'unattended.\nUse "-y" to override.')
-@@ -691,12 +864,62 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -691,12 +865,62 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
", ".join(matches))
self.verbose_logger.log(yum.logginglevels.INFO_2, msg)
@@ -742,7 +745,7 @@ index 6056d38..7f6643f
# get the list of available packages
# iterate over the user's list
# add packages to Transaction holding class if they match.
-@@ -710,11 +933,36 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -710,11 +934,36 @@ 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))):
@@ -781,7 +784,7 @@ index 6056d38..7f6643f
except yum.Errors.InstallError:
self.verbose_logger.log(yum.logginglevels.INFO_2,
_('No package %s%s%s available.'),
-@@ -723,6 +971,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -723,6 +972,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self._maybeYouMeant(arg)
else:
done = True
@@ -789,7 +792,7 @@ index 6056d38..7f6643f
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 +981,27 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -732,9 +982,27 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return 0, [_('Nothing to do')]
def updatePkgs(self, userlist, quiet=0, update_to=False):
@@ -820,7 +823,7 @@ index 6056d38..7f6643f
# 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 +1012,46 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -745,34 +1013,46 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
else:
# go through the userlist - look for items that are local rpms. If we find them
@@ -884,7 +887,7 @@ index 6056d38..7f6643f
level = 'diff'
if userlist and userlist[0] in ('full', 'diff', 'different'):
-@@ -831,6 +1110,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -831,6 +1111,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
continue
nayi = napkg.yumdb_info
@@ -892,7 +895,7 @@ index 6056d38..7f6643f
for apkg in self.pkgSack.searchPkgTuple(napkg.pkgtup):
if ('checksum_type' in nayi and
'checksum_data' in nayi and
-@@ -861,19 +1141,58 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -861,19 +1142,58 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
dupdates.extend(self.downgrade(name=n, epoch=e, ver=v, rel=r))
if dupdates:
@@ -959,7 +962,7 @@ index 6056d38..7f6643f
if not rms:
self._checkMaybeYouMeant(arg, always_output=False, rpmdb_only=True)
all_rms.extend(rms)
-@@ -884,12 +1203,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -884,12 +1204,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return 0, [_('No Packages marked for removal')]
def downgradePkgs(self, userlist):
@@ -987,7 +990,7 @@ index 6056d38..7f6643f
for arg in userlist:
if (arg.endswith('.rpm') and (yum.misc.re_remote_url(arg) or
os.path.exists(arg))):
-@@ -905,26 +1236,44 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -905,26 +1237,44 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self.term.MODE['bold'], arg,
self.term.MODE['normal'])
self._maybeYouMeant(arg)
@@ -1036,7 +1039,7 @@ index 6056d38..7f6643f
except yum.Errors.ReinstallRemoveError:
self._checkMaybeYouMeant(arg, always_output=False)
except yum.Errors.ReinstallInstallError, e:
-@@ -940,22 +1289,38 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -940,22 +1290,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)
@@ -1079,7 +1082,7 @@ index 6056d38..7f6643f
installing = False
for pkg in filelist:
-@@ -971,23 +1336,29 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -971,23 +1337,29 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return 2, [_('Package(s) to install')]
return 0, [_('Nothing to do')]
@@ -1125,7 +1128,7 @@ index 6056d38..7f6643f
pkgnarrow = 'all'
done_hidden_available = False
-@@ -1003,7 +1374,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1003,7 +1375,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
pkgnarrow = extcmds.pop(0)
ypl = self.doPackageLists(pkgnarrow=pkgnarrow, patterns=extcmds,
@@ -1134,7 +1137,7 @@ index 6056d38..7f6643f
if self.conf.showdupesfromrepos:
ypl.available += ypl.reinstall_available
-@@ -1017,8 +1388,25 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1017,8 +1389,25 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return ypl
def search(self, args):
@@ -1162,7 +1165,7 @@ index 6056d38..7f6643f
# call the yum module search function with lists of tags to search
# and what to search for
-@@ -1053,7 +1441,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1053,7 +1442,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
print ""
else:
mkeys = set(keys)
@@ -1171,7 +1174,7 @@ index 6056d38..7f6643f
okeys = keys
pos.add(po)
akeys.update(keys)
-@@ -1104,13 +1492,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1104,13 +1493,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self.logger.warning(_('Warning: No matches found for: %s'), arg)
if not akeys:
@@ -1189,9 +1192,9 @@ index 6056d38..7f6643f
+ :param args: a list of names or wildcards specifying packages
+ that should have their dependenices printed
+ :return: (exit_code, [ errors ])
-+
-+ exit_code is::
++ 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
@@ -1199,7 +1202,7 @@ index 6056d38..7f6643f
pkgs = []
for arg in args:
if (arg.endswith('.rpm') and (yum.misc.re_remote_url(arg) or
-@@ -1118,10 +1517,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1118,10 +1518,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
thispkg = yum.packages.YumUrlPackage(self, self.ts, arg)
pkgs.append(thispkg)
elif self.conf.showdupesfromrepos:
@@ -1214,7 +1217,7 @@ index 6056d38..7f6643f
except yum.Errors.PackageSackError:
pass
-@@ -1131,10 +1532,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1131,10 +1533,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return 0, []
def provides(self, args):
@@ -1238,7 +1241,7 @@ index 6056d38..7f6643f
old_sdup = self.conf.showdupesfromrepos
# For output, as searchPackageProvides() is always in showdups mode
self.conf.showdupesfromrepos = True
-@@ -1147,6 +1557,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1147,6 +1558,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
paths = set(sys.path + os.environ['PATH'].split(':'))
nargs = []
for arg in args:
@@ -1247,7 +1250,7 @@ index 6056d38..7f6643f
if yum.misc.re_filename(arg) or yum.misc.re_glob(arg):
continue
for path in paths:
-@@ -1158,25 +1570,82 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1158,25 +1571,82 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self.conf.showdupesfromrepos = old_sdup
if len(matching) == 0:
@@ -1336,7 +1339,7 @@ index 6056d38..7f6643f
hdrcode = pkgcode = xmlcode = dbcode = expccode = 0
pkgresults = hdrresults = xmlresults = dbresults = expcresults = []
msg = self.fmtKeyValFill(_('Cleaning repos: '),
-@@ -1184,7 +1653,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1184,7 +1654,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,
@@ -1345,7 +1348,7 @@ index 6056d38..7f6643f
pkgcode, pkgresults = self.cleanPackages()
hdrcode, hdrresults = self.cleanHeaders()
xmlcode, xmlresults = self.cleanMetadata()
-@@ -1200,10 +1669,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1200,10 +1670,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return code, []
if 'headers' in userlist:
@@ -1358,18 +1361,18 @@ index 6056d38..7f6643f
pkgcode, pkgresults = self.cleanPackages()
if 'metadata' in userlist:
self.logger.debug(_('Cleaning up xml metadata'))
-@@ -1228,138 +1697,265 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1228,138 +1698,265 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return code, []
def returnGroupLists(self, userlist):
+ """Print out a list of groups that match the given names or
+ wildcards.
-+
+
+- uservisible=1
+ :param extcmds: a list of names or wildcards specifying
+ groups to list
+ :return: (exit_code, [ errors ])
-
-- uservisible=1
++
+ exit_code is::
+
+ 0 = we're done, exit
@@ -1706,17 +1709,17 @@ index 6056d38..7f6643f
continue
if not pkgs_used:
-@@ -1368,17 +1964,55 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1368,17 +1965,55 @@ 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):
- """Remove only packages of the named group(s). Do not recurse."""
+ """Mark the packages in the given groups for removal.
-
++
+ :param grouplist: a list of names or wildcards specifying
+ groups to be removed
+ :return: (exit_code, [ errors ])
-+
+
+ exit_code is::
+
+ 0 = we're done, exit
@@ -1770,7 +1773,7 @@ index 6056d38..7f6643f
if not pkgs_used:
return 0, [_('No packages to remove from groups')]
-@@ -1389,7 +2023,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1389,7 +2024,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
def _promptWanted(self):
# shortcut for the always-off/always-on options
@@ -1779,7 +1782,7 @@ index 6056d38..7f6643f
return False
if self.conf.alwaysprompt:
return True
-@@ -1397,10 +2031,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1397,10 +2032,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
# prompt if:
# package was added to fill a dependency
# package is being removed
@@ -1791,7 +1794,7 @@ index 6056d38..7f6643f
txmbr.name not in self.extcmds:
return True
-@@ -1408,11 +2041,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1408,11 +2042,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return False
def usage(self):
@@ -1805,7 +1808,7 @@ index 6056d38..7f6643f
sys.stdout.write(self.optparser.get_usage())
def _installable(self, pkg, ematch=False):
-@@ -1468,9 +2101,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1468,9 +2102,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return False
class YumOptionParser(OptionParser):
@@ -1817,7 +1820,7 @@ index 6056d38..7f6643f
def __init__(self,base, **kwargs):
# check if this is called with a utils=True/False parameter
-@@ -1488,13 +2121,23 @@ class YumOptionParser(OptionParser):
+@@ -1488,13 +2122,23 @@ class YumOptionParser(OptionParser):
self._addYumBasicOptions()
def error(self, msg):
@@ -1843,7 +1846,7 @@ index 6056d38..7f6643f
try:
args = _filtercmdline(
('--noplugins','--version','-q', '-v', "--quiet", "--verbose"),
-@@ -1521,7 +2164,15 @@ class YumOptionParser(OptionParser):
+@@ -1521,7 +2165,15 @@ class YumOptionParser(OptionParser):
return ret
def setupYumConfig(self, args=None):
@@ -1860,7 +1863,7 @@ index 6056d38..7f6643f
if not args:
(opts, cmds) = self.parse_args()
else:
-@@ -1533,16 +2184,30 @@ class YumOptionParser(OptionParser):
+@@ -1533,16 +2185,30 @@ class YumOptionParser(OptionParser):
try:
# config file is parsed and moving us forward
# set some things in it.
@@ -1897,7 +1900,7 @@ index 6056d38..7f6643f
self.base.conf.cache = 1
if opts.obsoletes:
-@@ -1574,11 +2239,8 @@ class YumOptionParser(OptionParser):
+@@ -1574,11 +2240,8 @@ class YumOptionParser(OptionParser):
if opts.color != 'auto':
self.base.term.reinit(color=opts.color)
@@ -1911,7 +1914,7 @@ index 6056d38..7f6643f
for exclude in self._splitArg(opts.exclude):
try:
-@@ -1610,10 +2272,6 @@ class YumOptionParser(OptionParser):
+@@ -1610,10 +2273,6 @@ class YumOptionParser(OptionParser):
self.base.usage()
sys.exit(1)
@@ -1922,7 +1925,7 @@ index 6056d38..7f6643f
# Disable all gpg key checking, if requested.
if opts.nogpgcheck:
# Altering the normal configs. doesn't work too well, esp. with
-@@ -1623,7 +2281,7 @@ class YumOptionParser(OptionParser):
+@@ -1623,7 +2282,7 @@ class YumOptionParser(OptionParser):
repo._override_sigchecks = True
except ValueError, e:
@@ -1931,7 +1934,7 @@ index 6056d38..7f6643f
self.base.usage()
sys.exit(1)
-@@ -1640,10 +2298,18 @@ class YumOptionParser(OptionParser):
+@@ -1640,10 +2299,18 @@ class YumOptionParser(OptionParser):
sys.exit(1)
def getRoot(self,opts):
@@ -1951,7 +1954,7 @@ index 6056d38..7f6643f
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 +2367,9 @@ class YumOptionParser(OptionParser):
+@@ -1701,6 +2368,9 @@ class YumOptionParser(OptionParser):
group.add_option("--showduplicates", dest="showdupesfromrepos",
action="store_true",
help=_("show duplicates, in repos, in list/search commands"))
@@ -1961,7 +1964,7 @@ index 6056d38..7f6643f
group.add_option("-e", "--errorlevel", dest="errorlevel", default=None,
help=_("error output level"), type='int',
metavar='[error level]')
-@@ -1713,6 +2382,10 @@ class YumOptionParser(OptionParser):
+@@ -1713,6 +2383,10 @@ class YumOptionParser(OptionParser):
help=_("verbose operation"))
group.add_option("-y", "--assumeyes", dest="assumeyes",
action="store_true", help=_("answer yes for all questions"))
@@ -1972,7 +1975,7 @@ index 6056d38..7f6643f
group.add_option("--version", action="store_true",
help=_("show Yum version and exit"))
group.add_option("--installroot", help=_("set install root"),
-@@ -1730,6 +2403,9 @@ class YumOptionParser(OptionParser):
+@@ -1730,6 +2404,9 @@ class YumOptionParser(OptionParser):
group.add_option("", "--disableexcludes", default=[], action="append",
help=_("disable exclude from main, for a repo or for everything"),
metavar='[repo]')
@@ -1982,7 +1985,7 @@ index 6056d38..7f6643f
group.add_option("--obsoletes", action="store_true",
help=_("enable obsoletes processing during updates"))
group.add_option("--noplugins", action="store_true",
-@@ -1748,9 +2424,29 @@ class YumOptionParser(OptionParser):
+@@ -1748,9 +2425,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"))
@@ -2778,7 +2781,7 @@ index 0000000..2af059d
+ the mailing list, yum at lists.baseurl.org, or consult bugzilla.
+.fi
diff --git a/docs/yum.8 b/docs/yum.8
-index 1a8202a..0914765 100644
+index 1a8202a..dff88af 100644
--- a/docs/yum.8
+++ b/docs/yum.8
@@ -25,6 +25,8 @@ gnome\-packagekit application\&.
@@ -3082,7 +3085,7 @@ index 1a8202a..0914765 100644
last column will also display the number of packages in the repo. and (if there
are any user specified excludes) the number of packages excluded.
-@@ -291,11 +409,63 @@ then yum will ignore any repo errors and output the information it can get
+@@ -291,11 +409,66 @@ then yum will ignore any repo errors and output the information it can get
(Eg. "yum clean all; yum -C repolist" will output something, although the
package counts/etc. will be zeroed out).
.IP
@@ -3100,6 +3103,9 @@ index 1a8202a..0914765 100644
+"repository\-packages <repo> info" - Works like the "yum info" command, but
+only shows packages from the given repository.
+
++"repository\-packages <repo> check-update" - Works like the
++"yum check-update" command, but only shows packages from the given repository.
++
+"repository\-packages <repo> install" - Install all of the packages in the
+repository, basically the same as: yum install $(repoquery --repoid=<repo> -a).
+Specific packages/wildcards can be specified.
@@ -3148,7 +3154,7 @@ index 1a8202a..0914765 100644
packages (in sorted order), and the checksum_type/checksum_data entries from
the yumdb. Note that this rpmdb version is now also used significantly within
yum (esp. in yum history).
-@@ -321,26 +491,33 @@ and so takes sub-commands:
+@@ -321,26 +494,33 @@ and so takes sub-commands:
.IP "\fBhistory\fP"
The history command allows the user to view what has happened in past
transactions (assuming the history_record config. option is set). You can use
@@ -3188,7 +3194,7 @@ index 1a8202a..0914765 100644
A (if it is not still installed), and "rollback 1" will try to remove packages
B and C. Note that after a "rollback 1" you will have a fourth transaction,
although the ending rpmdb version (see: yum version) should be the same in
-@@ -349,13 +526,20 @@ transactions 1 and 4.
+@@ -349,13 +529,20 @@ transactions 1 and 4.
The addon-info command takes a transaction ID, and the packages-list command
takes a package (with wildcards).
@@ -3210,7 +3216,7 @@ index 1a8202a..0914765 100644
.I \fB>\fR - The rpmdb was changed, outside yum, after the transaction.
.br
.I \fB<\fR - The rpmdb was changed, outside yum, before the transaction.
-@@ -371,11 +555,156 @@ end of the package column in the packages-list command).
+@@ -371,11 +558,156 @@ end of the package column in the packages-list command).
.I \fBs\fR - The transaction completed fine, but --skip-broken was enabled and had to skip some packages.
.br
@@ -3369,7 +3375,7 @@ index 1a8202a..0914765 100644
The info command can also take ranges of transaction ids, of the form
start..end, which will then display a merged history as if all the
-@@ -401,6 +730,11 @@ Assume yes; assume that the answer to any question which would be asked
+@@ -401,6 +733,11 @@ Assume yes; assume that the answer to any question which would be asked
is yes\&.
.br
Configuration Option: \fBassumeyes\fP
@@ -3381,7 +3387,7 @@ index 1a8202a..0914765 100644
.IP "\fB\-c, \-\-config=[config file]\fP"
Specifies the config file location - can take HTTP and FTP URLs and local file
paths\&.
-@@ -420,7 +754,7 @@ Sets the error level to [number] Practical range 0 \- 10. 0 means print only cri
+@@ -420,7 +757,7 @@ Sets the error level to [number] Practical range 0 \- 10. 0 means print only cri
.br
Configuration Option: \fBerrorlevel\fP
.IP "\fB\-\-rpmverbosity=[name]\fP"
@@ -3390,7 +3396,7 @@ index 1a8202a..0914765 100644
options are: 'critical', 'emergency', 'error', 'warn' and 'debug'.
.br
Configuration Option: \fBrpmverbosity\fP
-@@ -428,9 +762,7 @@ Configuration Option: \fBrpmverbosity\fP
+@@ -428,9 +765,7 @@ Configuration Option: \fBrpmverbosity\fP
Sets the maximum amount of time yum will wait before performing a command \- it randomizes over the time.
.IP "\fB\-C, \-\-cacheonly\fP"
Tells yum to run entirely from system cache - does not download or
@@ -3401,7 +3407,7 @@ index 1a8202a..0914765 100644
.IP "\fB\-\-version\fP"
Reports the \fByum\fP version number and installed package versions for
everything in history_record_packages (can be added to by plugins).
-@@ -461,8 +793,13 @@ processing logic. For more information see the \fBupdate\fP command above.
+@@ -461,8 +796,13 @@ processing logic. For more information see the \fBupdate\fP command above.
.br
Configuration Option: \fBobsoletes\fP
.IP "\fB\-x, \-\-exclude=package\fP"
@@ -3417,7 +3423,7 @@ index 1a8202a..0914765 100644
.br
.IP "\fB\-\-color=[always|auto|never]\fP"
Display colorized output automatically, depending on the output terminal,
-@@ -479,6 +816,13 @@ main == disable excludes defined in [main] in yum.conf
+@@ -479,6 +819,13 @@ main == disable excludes defined in [main] in yum.conf
.br
repoid == disable excludes defined for that repo
.br
@@ -3431,7 +3437,7 @@ index 1a8202a..0914765 100644
.IP "\fB\-\-disableplugin=plugin\fP"
Run with one or more plugins disabled, the argument is a comma separated list
of wildcards to match against plugin names.
-@@ -506,7 +850,14 @@ option will corrupt your cache (and you can use $releasever in your cachedir
+@@ -506,7 +853,14 @@ option will corrupt your cache (and you can use $releasever in your cachedir
configuration to stop this).
.PP
.IP "\fB\-t, \-\-tolerant\fP"
@@ -3447,7 +3453,7 @@ index 1a8202a..0914765 100644
.br
.IP "\fB\-\-setopt=option=value\fP"
Set any config option in yum config or repo files. For options in the global
-@@ -523,7 +874,7 @@ version of the package\&.
+@@ -523,7 +877,7 @@ version of the package\&.
The format of the output of yum list is:
@@ -3456,7 +3462,7 @@ index 1a8202a..0914765 100644
.IP "\fByum list [all | glob_exp1] [glob_exp2] [\&.\&.\&.]\fP"
List all available and installed packages\&.
-@@ -542,6 +893,10 @@ shell\-style glob and any matches are printed\&.
+@@ -542,6 +896,10 @@ shell\-style glob and any matches are printed\&.
List the packages installed on the system that are not available in any yum
repository listed in the config file.
.IP
@@ -3467,7 +3473,7 @@ index 1a8202a..0914765 100644
.IP "\fByum list obsoletes [glob_exp1] [\&.\&.\&.]\fP"
List the packages installed on the system that are obsoleted by packages
in any yum repository listed in the config file.
-@@ -658,7 +1013,7 @@ configuration options.
+@@ -658,7 +1016,7 @@ configuration options.
.I yum-complete-transaction (1)
.I yumdownloader (1)
.I yum-utils (1)
@@ -196995,7 +197001,7 @@ index bfc49b7..f34ea19 100644
b = parsever(b)
diff --git a/yum/repoMDObject.py b/yum/repoMDObject.py
-index 31b1080..97e6797 100755
+index 31b1080..c2a349e 100755
--- a/yum/repoMDObject.py
+++ b/yum/repoMDObject.py
@@ -15,6 +15,7 @@
@@ -197055,7 +197061,7 @@ index 31b1080..97e6797 100755
# We trust any of these to mean the repomd.xml is valid.
infile = AutoFileChecksums(infile, ['sha256', 'sha512'],
-@@ -145,6 +163,13 @@ class RepoMD:
+@@ -145,8 +163,18 @@ class RepoMD:
if elem_name == "data":
thisdata = RepoData(elem=elem)
@@ -197068,8 +197074,13 @@ index 31b1080..97e6797 100755
+ thisdata = old
self.repoData[thisdata.type] = thisdata
try:
++ # NOTE: This will fail on float timestamps, this is
++ # required for compatability. Fix is to not generate
++ # float timestamps in repomd.xml.
nts = int(thisdata.timestamp)
-@@ -225,13 +250,19 @@ class RepoMD:
+ if nts > self.timestamp: # max() not in old python
+ self.timestamp = nts
+@@ -225,13 +253,19 @@ class RepoMD:
for item in self.tags['repo']:
tag = """ <repo>%s</repo>\n""" % (to_xml(item))
tags += tag
@@ -200079,7 +200090,7 @@ index e5e9ece..35359e2 100644
fo = None
diff --git a/yumcommands.py b/yumcommands.py
-index 4dcbea7..2b1c9c0 100644
+index 4dcbea7..b346128 100644
--- a/yumcommands.py
+++ b/yumcommands.py
@@ -13,6 +13,7 @@
@@ -201046,7 +201057,7 @@ index 4dcbea7..2b1c9c0 100644
cmd, extcmds = self._grp_cmd(basecmd, extcmds)
self._grp_setup_doCommand(base)
-@@ -514,136 +1036,546 @@ class GroupsCommand(YumCommand):
+@@ -514,140 +1036,551 @@ class GroupsCommand(YumCommand):
if cmd == 'list':
return base.returnGroupLists(extcmds)
@@ -201475,6 +201486,7 @@ index 4dcbea7..2b1c9c0 100644
-class ProvidesCommand(YumCommand):
- def getNames(self):
+- return ['provides', 'whatprovides']
+ def cacheRequirement(self, base, basecmd, extcmds):
+ """Return the cache requirements for the remote repos.
+
@@ -201497,7 +201509,7 @@ index 4dcbea7..2b1c9c0 100644
+
+ :return: a list containing the names of this command
+ """
- return ['provides', 'whatprovides']
++ return ['provides', 'whatprovides']
def getUsage(self):
+ """Return a usage string for this command.
@@ -201562,12 +201574,14 @@ index 4dcbea7..2b1c9c0 100644
+ """
+
def getNames(self):
+- return ['check-update']
+ """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 ['check-update']
++ return ['check-update', 'check-updates',
++ 'check-upgrade', 'check-upgrades']
def getUsage(self):
+ """Return a usage string for this command.
@@ -201593,7 +201607,8 @@ index 4dcbea7..2b1c9c0 100644
+ """
checkEnabledRepo(base)
- def doCommand(self, base, basecmd, extcmds):
+- def doCommand(self, base, basecmd, extcmds):
++ def doCommand(self, base, basecmd, extcmds, repoid=None):
+ """Execute this command.
+
+ :param base: a :class:`yum.Yumbase` object
@@ -201612,13 +201627,22 @@ index 4dcbea7..2b1c9c0 100644
base.extcmds.insert(0, 'updates')
result = 0
- try:
+- ypl = base.returnPkgLists(extcmds)
+ if True:
- ypl = base.returnPkgLists(extcmds)
++ ypl = base.returnPkgLists(extcmds, repoid=repoid)
if (base.conf.obsoletes or
base.verbose_logger.isEnabledFor(logginglevels.DEBUG_3)):
-@@ -675,162 +1607,472 @@ class CheckUpdateCommand(YumCommand):
+- typl = base.returnPkgLists(obscmds)
++ typl = base.returnPkgLists(obscmds, repoid=repoid)
+ ypl.obsoletes = typl.obsoletes
+ ypl.obsoletesTuples = typl.obsoletesTuples
+
+@@ -673,164 +1606,474 @@ class CheckUpdateCommand(YumCommand):
+ for obtup in sorted(ypl.obsoletesTuples,
+ key=operator.itemgetter(0)):
base.updatesObsoletesList(obtup, 'obsoletes',
- columns=columns)
+- columns=columns)
++ columns=columns, repoid=repoid)
result = 100
- except yum.Errors.YumBaseError, e:
- return 1, [str(e)]
@@ -202119,7 +202143,7 @@ index 4dcbea7..2b1c9c0 100644
def _repo_size(repo):
ret = 0
for pkg in repo.sack.returnPackages():
-@@ -838,12 +2080,9 @@ class RepoListCommand(YumCommand):
+@@ -838,12 +2081,9 @@ class RepoListCommand(YumCommand):
return base.format_number(ret)
def _repo_match(repo, patterns):
@@ -202134,7 +202158,7 @@ index 4dcbea7..2b1c9c0 100644
return True
return False
-@@ -857,7 +2096,10 @@ class RepoListCommand(YumCommand):
+@@ -857,7 +2097,10 @@ class RepoListCommand(YumCommand):
arg = 'enabled'
extcmds = map(lambda x: x.lower(), extcmds)
@@ -202146,7 +202170,7 @@ index 4dcbea7..2b1c9c0 100644
if arg != 'disabled' or extcmds:
try:
# Setup so len(repo.sack) is correct
-@@ -866,6 +2108,13 @@ class RepoListCommand(YumCommand):
+@@ -866,6 +2109,13 @@ class RepoListCommand(YumCommand):
except yum.Errors.RepoError:
if verbose:
raise
@@ -202160,7 +202184,7 @@ index 4dcbea7..2b1c9c0 100644
repos = base.repos.repos.values()
repos.sort()
-@@ -924,111 +2173,113 @@ class RepoListCommand(YumCommand):
+@@ -924,111 +2174,113 @@ class RepoListCommand(YumCommand):
ui_enabled = dhibeg + _('disabled') + hiend
ui_endis_wid = utf8_width(_('disabled'))
@@ -202370,7 +202394,7 @@ index 4dcbea7..2b1c9c0 100644
if not verbose and cols:
# Work out the first (id) and last (enabled/disalbed/count),
-@@ -1088,21 +2339,64 @@ class RepoListCommand(YumCommand):
+@@ -1088,21 +2340,64 @@ class RepoListCommand(YumCommand):
return 0, ['repolist: ' +to_unicode(locale.format("%d", tot_num, True))]
def needTs(self, base, basecmd, extcmds):
@@ -202435,7 +202459,7 @@ index 4dcbea7..2b1c9c0 100644
if len(extcmds) == 0:
base.usage()
raise cli.CliError
-@@ -1147,82 +2441,230 @@ class HelpCommand(YumCommand):
+@@ -1147,82 +2442,230 @@ class HelpCommand(YumCommand):
return help_output
def doCommand(self, base, basecmd, extcmds):
@@ -202675,7 +202699,7 @@ index 4dcbea7..2b1c9c0 100644
def _append_repos(cols, repo_data):
for repoid in sorted(repo_data):
-@@ -1264,7 +2706,7 @@ class VersionCommand(YumCommand):
+@@ -1264,7 +2707,7 @@ class VersionCommand(YumCommand):
if vcmd == 'groupinfo':
for group in groups:
@@ -202684,7 +202708,7 @@ index 4dcbea7..2b1c9c0 100644
continue
print _(" Group :"), group
print _(" Packages:")
-@@ -1284,11 +2726,35 @@ class VersionCommand(YumCommand):
+@@ -1284,11 +2727,35 @@ class VersionCommand(YumCommand):
return 0, ['version groupinfo']
@@ -202721,7 +202745,7 @@ index 4dcbea7..2b1c9c0 100644
data = base.rpmdb.simpleVersion(not verbose, groups=groups)
lastdbv = base.history.last()
if lastdbv is not None:
-@@ -1302,15 +2768,14 @@ class VersionCommand(YumCommand):
+@@ -1302,15 +2769,14 @@ class VersionCommand(YumCommand):
if groups:
for grp in sorted(data[2]):
if (vcmd.startswith("group-") and
@@ -202740,7 +202764,7 @@ index 4dcbea7..2b1c9c0 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 +2785,12 @@ class VersionCommand(YumCommand):
+@@ -1320,14 +2786,12 @@ class VersionCommand(YumCommand):
if groups:
for grp in sorted(data[2]):
if (vcmd.startswith("group-") and
@@ -202756,7 +202780,7 @@ index 4dcbea7..2b1c9c0 100644
data = {'rid' : {}, 'ver' : {}}
for (rid, ver) in cols:
-@@ -1344,6 +2807,14 @@ class VersionCommand(YumCommand):
+@@ -1344,6 +2808,14 @@ class VersionCommand(YumCommand):
return 0, ['version']
def needTs(self, base, basecmd, extcmds):
@@ -202771,7 +202795,7 @@ index 4dcbea7..2b1c9c0 100644
vcmd = 'installed'
if extcmds:
vcmd = extcmds[0]
-@@ -1352,25 +2823,74 @@ class VersionCommand(YumCommand):
+@@ -1352,25 +2824,74 @@ class VersionCommand(YumCommand):
return True
return vcmd in ('available', 'all', 'group-available', 'group-all')
@@ -202847,7 +202871,7 @@ index 4dcbea7..2b1c9c0 100644
return 2, ["Repeating transaction %u" % (old.tid,)]
def _hcmd_undo(self, base, extcmds):
-@@ -1426,12 +2946,57 @@ class HistoryCommand(YumCommand):
+@@ -1426,12 +2947,57 @@ class HistoryCommand(YumCommand):
def _hcmd_new(self, base, extcmds):
base.history._create_db_file()
@@ -202906,7 +202930,7 @@ index 4dcbea7..2b1c9c0 100644
if extcmds and extcmds[0] not in cmds:
base.logger.critical(_('Invalid history sub-command, use: %s.'),
", ".join(cmds))
-@@ -1444,6 +3009,19 @@ class HistoryCommand(YumCommand):
+@@ -1444,6 +3010,19 @@ class HistoryCommand(YumCommand):
raise cli.CliError
def doCommand(self, base, basecmd, extcmds):
@@ -202926,7 +202950,7 @@ index 4dcbea7..2b1c9c0 100644
vcmd = 'list'
if extcmds:
vcmd = extcmds[0]
-@@ -1468,29 +3046,88 @@ class HistoryCommand(YumCommand):
+@@ -1468,29 +3047,88 @@ class HistoryCommand(YumCommand):
ret = self._hcmd_rollback(base, extcmds)
elif vcmd == 'new':
ret = self._hcmd_new(base, extcmds)
@@ -203015,7 +203039,7 @@ index 4dcbea7..2b1c9c0 100644
chkcmd = 'all'
if extcmds:
chkcmd = extcmds
-@@ -1505,33 +3142,1115 @@ class CheckRpmdbCommand(YumCommand):
+@@ -1505,33 +3143,1123 @@ class CheckRpmdbCommand(YumCommand):
return rc, ['%s %s' % (basecmd, chkcmd)]
def needTs(self, base, basecmd, extcmds):
@@ -203399,6 +203423,9 @@ index 4dcbea7..2b1c9c0 100644
+ 'remove-or-distribution-synchronization' : 'remove-or-sync',
+ 'upgrade' : 'update', # Hack, but meh.
+ 'upgrade-to' : 'update-to', # Hack, but meh.
++ 'check-upgrade' : 'check-update', # Hack, but meh.
++ 'check-upgrades' : 'check-update', # Hack, but meh.
++ 'check-updates' : 'check-update', # Hack, but meh.
+ }
+ cmd = remap.get(cmd, cmd)
+
@@ -203407,6 +203434,8 @@ index 4dcbea7..2b1c9c0 100644
+ return ListCommand().doCommand(base, cmd, args, repoid=repoid)
+ elif cmd == 'info':
+ return InfoCommand().doCommand(base, cmd, args, repoid=repoid)
++ elif cmd == 'check-update':
++ return CheckUpdateCommand().doCommand(base, cmd, args,repoid=repoid)
+
+ elif cmd == 'install': # install is simpler version of installPkgs...
+ for arg in args:
@@ -203596,7 +203625,7 @@ index 4dcbea7..2b1c9c0 100644
+ if len(extcmds) > 1:
+ cmd = extcmds[1]
+ if cmd in ('info', 'list'):
-+ return InfoCommand().cacheRequirement(base, cmd, extcmds[2:])
++ return InfoCommand().needTs(base, cmd, extcmds[2:])
+
return True
@@ -203613,6 +203642,9 @@ index 4dcbea7..2b1c9c0 100644
+ cmd = extcmds[1]
+ if cmd in ('info', 'list'):
+ return InfoCommand().cacheRequirement(base, cmd, extcmds[2:])
++ if cmd in ('check-update', 'check-upgrade',
++ 'check-updates', 'check-upgrades'):
++ return CheckUpdateCommand().cacheRequirement(base, cmd, extcmds[2:])
+ return 'write'
+
+# Using this a lot, so make it easier...
diff --git a/yum.spec b/yum.spec
index b537722..dd81d8b 100644
--- a/yum.spec
+++ b/yum.spec
@@ -60,7 +60,7 @@ BuildRequires: bash-completion
Summary: RPM package installer/updater/manager
Name: yum
Version: 3.4.3
-Release: 120%{?dist}
+Release: 121%{?dist}
License: GPLv2+
Group: System Environment/Base
Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz
@@ -444,6 +444,13 @@ exit 0
%endif
%changelog
+* Fri Dec 6 2013 James Antill <james at fedoraproject.org> - 3.4.3-121
+- Fix cacheReq manipulation overwrite.
+- Only look at enabled repos. for cacheReq cookie comparisons. BZ 1039028.
+- Add check-update sub-command to repo-pkgs.
+- Add command variation aliases to check-update.
+- Fix needTs check with repo-pkgs list/info.
+
* Fri Dec 6 2013 Zdenek Pavlas <zpavlas at redhat.com> - 3.4.3-120
- Revert the use of float timestamps as it triggers repomd != metalink.
More information about the scm-commits
mailing list