[yum] update to latest HEAD
James Antill
james at fedoraproject.org
Wed Jan 29 21:16:19 UTC 2014
commit 39afdc0c617dbc039690fbac6d061934eba329eb
Author: James Antill <james at and.org>
Date: Wed Jan 29 16:16:42 2014 -0500
update to latest HEAD
- Add yum-cron to run_with_package_names.
- Don't create lockdir directories, as they are magic now. BZ 975864.
- Make 'yum install @group' give an error when trying to install a
- non-existent group.
- One more s/ouput/output/ fix
- Cleanup spec for rhel-7 builds.
yum-HEAD.patch | 515 +++++++++++++++++++++++++++++++-------------------------
yum.spec | 15 ++-
2 files changed, 297 insertions(+), 233 deletions(-)
---
diff --git a/yum-HEAD.patch b/yum-HEAD.patch
index 24f2bb5..12bde60 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..c8884ae
+index 6056d38..eed63a2
--- a/cli.py
+++ b/cli.py
@@ -25,7 +25,7 @@ import sys
@@ -747,7 +747,7 @@ index 6056d38..c8884ae
# get the list of available packages
# iterate over the user's list
# add packages to Transaction holding class if they match.
-@@ -710,11 +934,36 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -710,11 +934,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))):
@@ -783,10 +783,12 @@ index 6056d38..c8884ae
+ else:
+ assert basecmd == 'install', basecmd
+ txmbrs = self.install(pattern=arg)
++ except yum.Errors.GroupInstallError, e:
++ self.verbose_logger.log(yum.logginglevels.INFO_2, e)
except yum.Errors.InstallError:
self.verbose_logger.log(yum.logginglevels.INFO_2,
_('No package %s%s%s available.'),
-@@ -723,6 +972,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -723,6 +974,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self._maybeYouMeant(arg)
else:
done = True
@@ -794,7 +796,7 @@ index 6056d38..c8884ae
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 +982,27 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -732,9 +984,27 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return 0, [_('Nothing to do')]
def updatePkgs(self, userlist, quiet=0, update_to=False):
@@ -825,7 +827,7 @@ index 6056d38..c8884ae
# 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 +1013,46 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -745,34 +1015,46 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
else:
# go through the userlist - look for items that are local rpms. If we find them
@@ -889,7 +891,7 @@ index 6056d38..c8884ae
level = 'diff'
if userlist and userlist[0] in ('full', 'diff', 'different'):
-@@ -831,6 +1111,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -831,6 +1113,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
continue
nayi = napkg.yumdb_info
@@ -897,7 +899,7 @@ index 6056d38..c8884ae
for apkg in self.pkgSack.searchPkgTuple(napkg.pkgtup):
if ('checksum_type' in nayi and
'checksum_data' in nayi and
-@@ -861,19 +1142,58 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -861,19 +1144,58 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
dupdates.extend(self.downgrade(name=n, epoch=e, ver=v, rel=r))
if dupdates:
@@ -964,7 +966,7 @@ index 6056d38..c8884ae
if not rms:
self._checkMaybeYouMeant(arg, always_output=False, rpmdb_only=True)
all_rms.extend(rms)
-@@ -884,12 +1204,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -884,12 +1206,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return 0, [_('No Packages marked for removal')]
def downgradePkgs(self, userlist):
@@ -992,7 +994,7 @@ index 6056d38..c8884ae
for arg in userlist:
if (arg.endswith('.rpm') and (yum.misc.re_remote_url(arg) or
os.path.exists(arg))):
-@@ -905,26 +1237,44 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -905,26 +1239,44 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self.term.MODE['bold'], arg,
self.term.MODE['normal'])
self._maybeYouMeant(arg)
@@ -1041,7 +1043,7 @@ index 6056d38..c8884ae
except yum.Errors.ReinstallRemoveError:
self._checkMaybeYouMeant(arg, always_output=False)
except yum.Errors.ReinstallInstallError, e:
-@@ -940,22 +1290,38 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -940,22 +1292,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)
@@ -1084,7 +1086,7 @@ index 6056d38..c8884ae
installing = False
for pkg in filelist:
-@@ -971,23 +1337,29 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -971,23 +1339,29 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return 2, [_('Package(s) to install')]
return 0, [_('Nothing to do')]
@@ -1130,7 +1132,7 @@ index 6056d38..c8884ae
pkgnarrow = 'all'
done_hidden_available = False
-@@ -1003,7 +1375,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1003,7 +1377,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
pkgnarrow = extcmds.pop(0)
ypl = self.doPackageLists(pkgnarrow=pkgnarrow, patterns=extcmds,
@@ -1139,7 +1141,7 @@ index 6056d38..c8884ae
if self.conf.showdupesfromrepos:
ypl.available += ypl.reinstall_available
-@@ -1017,8 +1389,25 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1017,8 +1391,25 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return ypl
def search(self, args):
@@ -1167,7 +1169,7 @@ index 6056d38..c8884ae
# call the yum module search function with lists of tags to search
# and what to search for
-@@ -1053,7 +1442,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1053,7 +1444,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
print ""
else:
mkeys = set(keys)
@@ -1176,7 +1178,7 @@ index 6056d38..c8884ae
okeys = keys
pos.add(po)
akeys.update(keys)
-@@ -1104,13 +1493,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1104,13 +1495,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self.logger.warning(_('Warning: No matches found for: %s'), arg)
if not akeys:
@@ -1190,13 +1192,13 @@ index 6056d38..c8884ae
+ """Print out a formatted list of dependencies for a list of
+ packages. This is a cli wrapper method for
+ :class:`yum.YumBase.findDeps`.
-+
+
+ :param args: a list of names or wildcards specifying packages
+ that should have their dependenices printed
+ :return: (exit_code, [ errors ])
+
+ exit_code is::
-
++
+ 0 = we're done, exit
+ 1 = we've errored, exit with error string
+ 2 = we've got work yet to do, onto the next stage
@@ -1204,7 +1206,7 @@ index 6056d38..c8884ae
pkgs = []
for arg in args:
if (arg.endswith('.rpm') and (yum.misc.re_remote_url(arg) or
-@@ -1118,10 +1518,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1118,10 +1520,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
thispkg = yum.packages.YumUrlPackage(self, self.ts, arg)
pkgs.append(thispkg)
elif self.conf.showdupesfromrepos:
@@ -1219,7 +1221,7 @@ index 6056d38..c8884ae
except yum.Errors.PackageSackError:
pass
-@@ -1131,10 +1533,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1131,10 +1535,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return 0, []
def provides(self, args):
@@ -1243,7 +1245,7 @@ index 6056d38..c8884ae
old_sdup = self.conf.showdupesfromrepos
# For output, as searchPackageProvides() is always in showdups mode
self.conf.showdupesfromrepos = True
-@@ -1147,6 +1558,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1147,6 +1560,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
paths = set(sys.path + os.environ['PATH'].split(':'))
nargs = []
for arg in args:
@@ -1252,7 +1254,7 @@ index 6056d38..c8884ae
if yum.misc.re_filename(arg) or yum.misc.re_glob(arg):
continue
for path in paths:
-@@ -1158,25 +1571,82 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1158,25 +1573,82 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self.conf.showdupesfromrepos = old_sdup
if len(matching) == 0:
@@ -1341,7 +1343,7 @@ index 6056d38..c8884ae
hdrcode = pkgcode = xmlcode = dbcode = expccode = 0
pkgresults = hdrresults = xmlresults = dbresults = expcresults = []
msg = self.fmtKeyValFill(_('Cleaning repos: '),
-@@ -1184,7 +1654,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1184,7 +1656,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,
@@ -1350,7 +1352,7 @@ index 6056d38..c8884ae
pkgcode, pkgresults = self.cleanPackages()
hdrcode, hdrresults = self.cleanHeaders()
xmlcode, xmlresults = self.cleanMetadata()
-@@ -1200,10 +1670,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1200,10 +1672,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return code, []
if 'headers' in userlist:
@@ -1363,18 +1365,18 @@ index 6056d38..c8884ae
pkgcode, pkgresults = self.cleanPackages()
if 'metadata' in userlist:
self.logger.debug(_('Cleaning up xml metadata'))
-@@ -1228,159 +1698,336 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1228,159 +1700,345 @@ 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
@@ -1669,6 +1671,7 @@ index 6056d38..c8884ae
+ for igrp in self.igroups.groups:
+ pkgs_used.extend(self._at_groupupgrade('@' + igrp))
++ done = False
for group_string in grouplist:
+
+ grp_grp = True
@@ -1717,11 +1720,20 @@ index 6056d38..c8884ae
- self.logger.error(_('Warning: Group %s does not exist.'), group_string)
+ self.logger.error(_('Warning: group %s does not exist.'), group_string)
continue
++ done = True
if not pkgs_used:
+- return 0, [_('No packages in any requested group available to install or update')]
+ if self.conf.group_command == 'objects':
+ self.logger.critical(_("Maybe run: yum groups mark install (see man yum)"))
- return 0, [_('No packages in any requested group available to install or update')]
++ exit_status = 1
++ if upgrade:
++ # upgrades don't fail
++ exit_status = 0
++ if done:
++ # at least one group_string was a valid group
++ exit_status = 0
++ return exit_status, [_('No packages in any requested group available to install or update')]
else:
return 2, [P_('%d package to Install', '%d packages to Install', len(pkgs_used)) % len(pkgs_used)]
@@ -1732,9 +1744,9 @@ index 6056d38..c8884ae
+ :param grouplist: a list of names or wildcards specifying
+ groups to be removed
+ :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
@@ -1790,7 +1802,7 @@ index 6056d38..c8884ae
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 +2036,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1389,7 +2047,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
def _promptWanted(self):
# shortcut for the always-off/always-on options
@@ -1799,7 +1811,7 @@ index 6056d38..c8884ae
return False
if self.conf.alwaysprompt:
return True
-@@ -1397,10 +2044,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1397,10 +2055,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
# prompt if:
# package was added to fill a dependency
# package is being removed
@@ -1811,7 +1823,7 @@ index 6056d38..c8884ae
txmbr.name not in self.extcmds:
return True
-@@ -1408,11 +2054,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1408,11 +2065,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return False
def usage(self):
@@ -1825,7 +1837,7 @@ index 6056d38..c8884ae
sys.stdout.write(self.optparser.get_usage())
def _installable(self, pkg, ematch=False):
-@@ -1468,9 +2114,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1468,9 +2125,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return False
class YumOptionParser(OptionParser):
@@ -1837,7 +1849,7 @@ index 6056d38..c8884ae
def __init__(self,base, **kwargs):
# check if this is called with a utils=True/False parameter
-@@ -1488,13 +2134,23 @@ class YumOptionParser(OptionParser):
+@@ -1488,13 +2145,23 @@ class YumOptionParser(OptionParser):
self._addYumBasicOptions()
def error(self, msg):
@@ -1863,7 +1875,7 @@ index 6056d38..c8884ae
try:
args = _filtercmdline(
('--noplugins','--version','-q', '-v', "--quiet", "--verbose"),
-@@ -1521,7 +2177,15 @@ class YumOptionParser(OptionParser):
+@@ -1521,7 +2188,15 @@ class YumOptionParser(OptionParser):
return ret
def setupYumConfig(self, args=None):
@@ -1880,7 +1892,7 @@ index 6056d38..c8884ae
if not args:
(opts, cmds) = self.parse_args()
else:
-@@ -1533,16 +2197,30 @@ class YumOptionParser(OptionParser):
+@@ -1533,16 +2208,30 @@ class YumOptionParser(OptionParser):
try:
# config file is parsed and moving us forward
# set some things in it.
@@ -1917,7 +1929,7 @@ index 6056d38..c8884ae
self.base.conf.cache = 1
if opts.obsoletes:
-@@ -1574,11 +2252,8 @@ class YumOptionParser(OptionParser):
+@@ -1574,11 +2263,8 @@ class YumOptionParser(OptionParser):
if opts.color != 'auto':
self.base.term.reinit(color=opts.color)
@@ -1931,7 +1943,7 @@ index 6056d38..c8884ae
for exclude in self._splitArg(opts.exclude):
try:
-@@ -1610,10 +2285,6 @@ class YumOptionParser(OptionParser):
+@@ -1610,10 +2296,6 @@ class YumOptionParser(OptionParser):
self.base.usage()
sys.exit(1)
@@ -1942,7 +1954,7 @@ index 6056d38..c8884ae
# Disable all gpg key checking, if requested.
if opts.nogpgcheck:
# Altering the normal configs. doesn't work too well, esp. with
-@@ -1623,7 +2294,7 @@ class YumOptionParser(OptionParser):
+@@ -1623,7 +2305,7 @@ class YumOptionParser(OptionParser):
repo._override_sigchecks = True
except ValueError, e:
@@ -1951,7 +1963,7 @@ index 6056d38..c8884ae
self.base.usage()
sys.exit(1)
-@@ -1640,10 +2311,18 @@ class YumOptionParser(OptionParser):
+@@ -1640,10 +2322,18 @@ class YumOptionParser(OptionParser):
sys.exit(1)
def getRoot(self,opts):
@@ -1971,7 +1983,7 @@ index 6056d38..c8884ae
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 +2380,9 @@ class YumOptionParser(OptionParser):
+@@ -1701,6 +2391,9 @@ class YumOptionParser(OptionParser):
group.add_option("--showduplicates", dest="showdupesfromrepos",
action="store_true",
help=_("show duplicates, in repos, in list/search commands"))
@@ -1981,7 +1993,7 @@ index 6056d38..c8884ae
group.add_option("-e", "--errorlevel", dest="errorlevel", default=None,
help=_("error output level"), type='int',
metavar='[error level]')
-@@ -1713,6 +2395,10 @@ class YumOptionParser(OptionParser):
+@@ -1713,6 +2406,10 @@ class YumOptionParser(OptionParser):
help=_("verbose operation"))
group.add_option("-y", "--assumeyes", dest="assumeyes",
action="store_true", help=_("answer yes for all questions"))
@@ -1992,7 +2004,7 @@ index 6056d38..c8884ae
group.add_option("--version", action="store_true",
help=_("show Yum version and exit"))
group.add_option("--installroot", help=_("set install root"),
-@@ -1730,6 +2416,9 @@ class YumOptionParser(OptionParser):
+@@ -1730,6 +2427,9 @@ class YumOptionParser(OptionParser):
group.add_option("", "--disableexcludes", default=[], action="append",
help=_("disable exclude from main, for a repo or for everything"),
metavar='[repo]')
@@ -2002,7 +2014,7 @@ index 6056d38..c8884ae
group.add_option("--obsoletes", action="store_true",
help=_("enable obsoletes processing during updates"))
group.add_option("--noplugins", action="store_true",
-@@ -1748,9 +2437,29 @@ class YumOptionParser(OptionParser):
+@@ -1748,9 +2448,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"))
@@ -2515,7 +2527,7 @@ index 0000000..867d323
+]
diff --git a/docs/sphinxdocs/rstgenerator.py b/docs/sphinxdocs/rstgenerator.py
new file mode 100755
-index 0000000..ad24788
+index 0000000..4a0bca0
--- /dev/null
+++ b/docs/sphinxdocs/rstgenerator.py
@@ -0,0 +1,222 @@
@@ -2533,7 +2545,7 @@ index 0000000..ad24788
+ source code file
+ :param file_name: the name of the python source code file to generate
+ a sphinx rst file describing
-+ :param ouput_directory: a string specifying the directory where
++ :param output_directory: a string specifying the directory where
+ the generated rst file should be placed. If *output_directory* does
+ not already exist, it will be created
+ :param package_heirarchy: a list of strings, where each name is
@@ -4420,7 +4432,7 @@ index 63c5ec0..0000000
-exit $RETVAL
diff --git a/etc/yum-cron-hourly.conf b/etc/yum-cron-hourly.conf
new file mode 100644
-index 0000000..7871a46
+index 0000000..2a588cd
--- /dev/null
+++ b/etc/yum-cron-hourly.conf
@@ -0,0 +1,79 @@
@@ -4468,7 +4480,7 @@ index 0000000..7871a46
+
+# The width, in characters, that messages that are emitted should be
+# formatted to.
-+ouput_width = 80
++output_width = 80
+
+
+[email]
@@ -4505,7 +4517,7 @@ index 0000000..7871a46
+# assumeyes = True
diff --git a/etc/yum-cron-security.conf b/etc/yum-cron-security.conf
new file mode 100644
-index 0000000..b0edd9d
+index 0000000..2ddbc6d
--- /dev/null
+++ b/etc/yum-cron-security.conf
@@ -0,0 +1,82 @@
@@ -4556,7 +4568,7 @@ index 0000000..b0edd9d
+
+# The width, in characters, that messages that are emitted should be
+# formatted to.
-+ouput_width = 80
++output_width = 80
+
+
+[email]
@@ -4593,7 +4605,7 @@ index 0000000..b0edd9d
+# assumeyes = True
diff --git a/etc/yum-cron.conf b/etc/yum-cron.conf
new file mode 100644
-index 0000000..bd26d0c
+index 0000000..960fcc9
--- /dev/null
+++ b/etc/yum-cron.conf
@@ -0,0 +1,82 @@
@@ -4643,7 +4655,7 @@ index 0000000..bd26d0c
+
+# The width, in characters, that messages that are emitted should be
+# formatted to.
-+ouput_width = 80
++output_width = 80
+
+
+[email]
@@ -183030,7 +183042,7 @@ index 121ad5b..778ed2d 100644
self.ts.setFlags(origflags)
diff --git a/shell.py b/shell.py
-index 999bffc..2232b03 100644
+index 999bffc..00b6896 100644
--- a/shell.py
+++ b/shell.py
@@ -26,13 +26,11 @@ import logging
@@ -183127,7 +183139,7 @@ index 999bffc..2232b03 100644
def do_help(self, arg):
+ """Output help information.
+
-+ :param arg: the command to ouput help information about. If
++ :param arg: the command to output help information about. If
+ *arg* is an empty string, general help will be output.
+ """
msg = """
@@ -184862,10 +184874,10 @@ index 0000000..28e1964
+- Check if we're running as root; exit nicely.
diff --git a/yum-cron/yum-cron.py b/yum-cron/yum-cron.py
new file mode 100755
-index 0000000..e1028be
+index 0000000..20911af
--- /dev/null
+++ b/yum-cron/yum-cron.py
-@@ -0,0 +1,711 @@
+@@ -0,0 +1,713 @@
+#!/usr/bin/python -tt
+import os
+import sys
@@ -185464,6 +185476,8 @@ index 0000000..e1028be
+ # Acquire the yum lock
+ self.acquireLock()
+
++ self.run_with_package_names.add("yum-cron")
++
+ # Update the metadata
+ self.populateUpdateMetadata()
+
@@ -186320,10 +186334,10 @@ index 1ce4720..2f3f7a3
gobject.threads_init()
dbus.glib.threads_init()
diff --git a/yum.spec b/yum.spec
-index abd203f..c6bc8fc 100644
+index abd203f..93cfa14 100644
--- a/yum.spec
+++ b/yum.spec
-@@ -1,24 +1,100 @@
+@@ -1,24 +1,104 @@
-Summary: RPM installer/updater
+%define move_yum_conf_back 1
+%define auto_sitelib 1
@@ -186338,6 +186352,10 @@ index abd203f..c6bc8fc 100644
+%if 0%{?rhel} <= 6
+# rhel-6 doesn't have the systemd stuff...
+%define yum_cron_systemd 0
++%endif
++
++%if 0%{?rhel} <= 7
++# rhel-7 doesn't use systemd timers...
+%define yum_makecache_systemd 0
+%endif
+
@@ -186430,7 +186448,7 @@ index abd203f..c6bc8fc 100644
Conflicts: rpm >= 5-0
# Zif is a re-implementation of yum in C, however:
#
-@@ -34,18 +110,32 @@ Conflicts: rpm >= 5-0
+@@ -34,18 +114,32 @@ Conflicts: rpm >= 5-0
# zif experts).
#
# ...so we have two sane choices: i) Conflict with it. 2) Stop developing yum.
@@ -186470,7 +186488,7 @@ index abd203f..c6bc8fc 100644
%description
Yum is a utility that can check for and automatically download and
-@@ -58,9 +148,11 @@ Group: Applications/System
+@@ -58,9 +152,11 @@ Group: Applications/System
Requires: yum = %{version}-%{release}
Requires: dbus-python
Requires: pygobject2
@@ -186484,7 +186502,7 @@ index abd203f..c6bc8fc 100644
Requires(postun): /sbin/service
-@@ -68,20 +160,69 @@ Requires(postun): /sbin/service
+@@ -68,20 +164,69 @@ Requires(postun): /sbin/service
yum-updatesd provides a daemon which checks for available updates and
can notify you when they are available via email, syslog or dbus.
@@ -186559,7 +186577,7 @@ index abd203f..c6bc8fc 100644
%prep
%setup -q
-@@ -89,12 +230,46 @@ Install this package if you want auto yum updates nightly via cron.
+@@ -89,12 +234,46 @@ Install this package if you want auto yum updates nightly via cron.
%build
make
@@ -186609,7 +186627,7 @@ index abd203f..c6bc8fc 100644
# Ghost files:
mkdir -p $RPM_BUILD_ROOT/var/lib/yum/history
-@@ -102,12 +277,31 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/yum/plugins
+@@ -102,12 +281,31 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/yum/plugins
mkdir -p $RPM_BUILD_ROOT/var/lib/yum/yumdb
touch $RPM_BUILD_ROOT/var/lib/yum/uuid
@@ -186641,7 +186659,7 @@ index abd203f..c6bc8fc 100644
%post updatesd
/sbin/chkconfig --add yum-updatesd
/sbin/service yum-updatesd condrestart >/dev/null 2>&1
-@@ -119,9 +313,29 @@ if [ $1 = 0 ]; then
+@@ -119,9 +317,29 @@ if [ $1 = 0 ]; then
/sbin/service yum-updatesd stop >/dev/null 2>&1
fi
exit 0
@@ -186672,7 +186690,7 @@ index abd203f..c6bc8fc 100644
# Make sure chkconfig knows about the service
/sbin/chkconfig --add yum-cron
# if an upgrade:
-@@ -144,8 +358,13 @@ if [ "$1" -ge "1" ]; then
+@@ -144,8 +362,13 @@ if [ "$1" -ge "1" ]; then
fi
fi
exit 0
@@ -186686,7 +186704,7 @@ index abd203f..c6bc8fc 100644
# if this will be a complete removeal of yum-cron rather than an upgrade,
# remove the service from chkconfig control
if [ $1 = 0 ]; then
-@@ -153,33 +372,59 @@ if [ $1 = 0 ]; then
+@@ -153,33 +376,59 @@ if [ $1 = 0 ]; then
/sbin/service yum-cron stop 1> /dev/null 2>&1
fi
exit 0
@@ -186719,8 +186737,9 @@ index abd203f..c6bc8fc 100644
%files -f %{name}.lang
-%defattr(-, root, root)
+-%doc README AUTHORS COPYING TODO INSTALL ChangeLog PLUGINS
+%defattr(-, root, root, -)
- %doc README AUTHORS COPYING TODO INSTALL ChangeLog PLUGINS
++%doc README AUTHORS COPYING TODO ChangeLog PLUGINS
+%if %{move_yum_conf_back}
+%config(noreplace) %{_sysconfdir}/yum.conf
+%dir %{_sysconfdir}/yum.repos.d
@@ -186752,7 +186771,7 @@ index abd203f..c6bc8fc 100644
%dir /var/cache/yum
%dir /var/lib/yum
%ghost /var/lib/yum/uuid
-@@ -188,20 +433,46 @@ exit 0
+@@ -188,20 +437,46 @@ exit 0
%ghost /var/lib/yum/yumdb
%{_mandir}/man*/yum.*
%{_mandir}/man*/yum-shell*
@@ -186804,7 +186823,7 @@ index abd203f..c6bc8fc 100644
%files updatesd
%defattr(-, root, root)
%config(noreplace) %{_sysconfdir}/yum/yum-updatesd.conf
-@@ -210,8 +481,12 @@ exit 0
+@@ -210,8 +485,12 @@ exit 0
%{_datadir}/yum-cli/yumupd.py*
%{_sbindir}/yum-updatesd
%{_mandir}/man*/yum-updatesd*
@@ -186818,7 +186837,7 @@ index abd203f..c6bc8fc 100644
- 3.4.1
- umask bug fix.
diff --git a/yum/Errors.py b/yum/Errors.py
-index c1af4ad..70de539 100644
+index c1af4ad..2c2f022 100644
--- a/yum/Errors.py
+++ b/yum/Errors.py
@@ -18,7 +18,7 @@
@@ -186862,8 +186881,18 @@ index c1af4ad..70de539 100644
class ConfigError(YumBaseError):
pass
+@@ -94,6 +105,9 @@ class GroupsError(YumBaseError):
+ class InstallError(YumBaseError):
+ pass
+
++class GroupInstallError(InstallError):
++ pass
++
+ class UpdateError(YumBaseError):
+ pass
+
diff --git a/yum/__init__.py b/yum/__init__.py
-index 99039e0..bbd20f3 100644
+index 99039e0..7427780 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -21,6 +21,7 @@ The Yum RPM software updater.
@@ -187564,7 +187593,7 @@ index 99039e0..bbd20f3 100644
necessary = False
# I can't think of a nice way of doing this, we have to have the sack here
-@@ -951,8 +1145,12 @@ class YumBase(depsolve.Depsolve):
+@@ -951,25 +1145,37 @@ class YumBase(depsolve.Depsolve):
self.repos.populateSack(mdtype='filelists')
def yumUtilsMsg(self, func, prog):
@@ -187579,8 +187608,13 @@ index 99039e0..bbd20f3 100644
if self.rpmdb.contains(name="yum-utils"):
return
-@@ -964,12 +1162,25 @@ class YumBase(depsolve.Depsolve):
- (hibeg, prog, hiend))
+- hibeg, hiend = "", ""
+- if hasattr(self, 'term'):
+- hibeg, hiend = self.term.MODE['bold'], self.term.MODE['normal']
+-
+- func(_("The program %s%s%s is found in the yum-utils package.") %
+- (hibeg, prog, hiend))
++ func(_("The program %s is found in the yum-utils package.") % self._try_bold(prog))
def buildTransaction(self, unfinished_transactions_check=True):
- """go through the packages in the transaction set, find them in the
@@ -187608,7 +187642,7 @@ index 99039e0..bbd20f3 100644
self.logger.critical(msg)
self.yumUtilsMsg(self.logger.critical, "yum-complete-transaction")
time.sleep(3)
-@@ -1004,7 +1215,7 @@ class YumBase(depsolve.Depsolve):
+@@ -1004,7 +1210,7 @@ class YumBase(depsolve.Depsolve):
# If transaction was changed by postresolve plugins then we should run skipbroken again
(rescode, restring) = self._doSkipBroken(rescode, restring, clear_skipped=False )
@@ -187617,7 +187651,7 @@ index 99039e0..bbd20f3 100644
self.tsInfo.pkgSack.dropCachedData()
# FIXME: This is horrible, see below and yummain. Maybe create a real
-@@ -1044,6 +1255,39 @@ class YumBase(depsolve.Depsolve):
+@@ -1044,6 +1250,39 @@ class YumBase(depsolve.Depsolve):
if first.verEQ(other):
continue
msg = _('Protected multilib versions: %s != %s')
@@ -187657,7 +187691,7 @@ index 99039e0..bbd20f3 100644
xrestring.append(msg % (first, other))
if xrestring:
rescode = 1
-@@ -1227,7 +1471,7 @@ class YumBase(depsolve.Depsolve):
+@@ -1227,7 +1466,7 @@ class YumBase(depsolve.Depsolve):
self.verbose_logger.info(msg)
self.skipped_packages.extend(skipped_list) # make the skipped packages public
else:
@@ -187666,7 +187700,7 @@ index 99039e0..bbd20f3 100644
self.verbose_logger.info("Skip-broken could not solve problems")
return 1, orig_restring
return rescode, restring
-@@ -1242,13 +1486,15 @@ class YumBase(depsolve.Depsolve):
+@@ -1242,13 +1481,15 @@ class YumBase(depsolve.Depsolve):
if None in pkgtup:
return None
return pkgtup
@@ -187686,7 +187720,7 @@ index 99039e0..bbd20f3 100644
if pkgtup is None:
return
self._not_found_i[pkgtup] = YumNotFoundPackage(pkgtup)
-@@ -1267,7 +1513,7 @@ class YumBase(depsolve.Depsolve):
+@@ -1267,7 +1508,7 @@ class YumBase(depsolve.Depsolve):
for pkg in txmbr.obsoleted_by:
# check if the obsoleting txmbr is in the transaction
# else remove the obsoleted txmbr
@@ -187695,7 +187729,7 @@ index 99039e0..bbd20f3 100644
if not self.tsInfo.exists(pkg.pkgtup):
self.verbose_logger.debug('SKIPBROKEN: Remove extra obsoleted %s (%s)' % (txmbr.po,pkg) )
self.tsInfo.remove(txmbr.po.pkgtup)
-@@ -1275,14 +1521,14 @@ class YumBase(depsolve.Depsolve):
+@@ -1275,14 +1516,14 @@ class YumBase(depsolve.Depsolve):
def _checkUpdatedLeftovers(self):
"""
If multiple packages is updated the same package
@@ -187712,7 +187746,7 @@ index 99039e0..bbd20f3 100644
if not self.tsInfo.exists(pkg.pkgtup):
self.verbose_logger.debug('SKIPBROKEN: Remove extra updated %s (%s)' % (txmbr.po,pkg) )
self.tsInfo.remove(txmbr.po.pkgtup)
-@@ -1379,9 +1625,19 @@ class YumBase(depsolve.Depsolve):
+@@ -1379,9 +1620,19 @@ class YumBase(depsolve.Depsolve):
def _getDepsToRemove(self,po, deptree, toRemove):
for dep in deptree.get(po, []): # Loop trough all deps of po
@@ -187732,7 +187766,7 @@ index 99039e0..bbd20f3 100644
toRemove.add(dep)
self._getDepsToRemove(dep, deptree, toRemove)
-@@ -1454,7 +1710,46 @@ class YumBase(depsolve.Depsolve):
+@@ -1454,7 +1705,46 @@ class YumBase(depsolve.Depsolve):
return probs
def runTransaction(self, cb):
@@ -187780,7 +187814,7 @@ index 99039e0..bbd20f3 100644
self.plugins.run('pretrans')
-@@ -1516,10 +1811,23 @@ class YumBase(depsolve.Depsolve):
+@@ -1516,10 +1806,23 @@ class YumBase(depsolve.Depsolve):
pass
self._ts_save_file = None
@@ -187804,7 +187838,7 @@ index 99039e0..bbd20f3 100644
# make resultobject - just a plain yumgenericholder object
resultobject = misc.GenericHolder()
-@@ -1544,8 +1852,7 @@ class YumBase(depsolve.Depsolve):
+@@ -1544,8 +1847,7 @@ class YumBase(depsolve.Depsolve):
errors=errors)
@@ -187814,7 +187848,7 @@ index 99039e0..bbd20f3 100644
self.cleanUsedHeadersPackages()
for i in ('ts_all_fn', 'ts_done_fn'):
-@@ -1567,13 +1874,35 @@ class YumBase(depsolve.Depsolve):
+@@ -1567,13 +1869,35 @@ class YumBase(depsolve.Depsolve):
self.plugins.run('posttrans')
# sync up what just happened versus what is in the rpmdb
if not self.ts.isTsFlagSet(rpm.RPMTRANS_FLAG_TEST):
@@ -187855,7 +187889,7 @@ index 99039e0..bbd20f3 100644
# check to see that the rpmdb and the tsInfo roughly matches
# push package object metadata outside of rpmdb into yumdb
# delete old yumdb metadata entries
-@@ -1584,24 +1913,40 @@ class YumBase(depsolve.Depsolve):
+@@ -1584,24 +1908,40 @@ class YumBase(depsolve.Depsolve):
# that there is not also an install of this pkg in the tsInfo (reinstall)
# for any kind of install add from_repo to the yumdb, and the cmdline
# and the install reason
@@ -187897,7 +187931,7 @@ index 99039e0..bbd20f3 100644
if hasattr(self, 'args') and self.args:
po.yumdb_info.command_line = ' '.join(self.args)
elif hasattr(self, 'cmds') and self.cmds:
-@@ -1630,6 +1975,10 @@ class YumBase(depsolve.Depsolve):
+@@ -1630,6 +1970,10 @@ class YumBase(depsolve.Depsolve):
if md:
po.yumdb_info.from_repo_timestamp = str(md.timestamp)
@@ -187908,7 +187942,7 @@ index 99039e0..bbd20f3 100644
loginuid = misc.getloginuid()
if txmbr.updates or txmbr.downgrades or txmbr.reinstall:
if txmbr.updates:
-@@ -1640,11 +1989,16 @@ class YumBase(depsolve.Depsolve):
+@@ -1640,11 +1984,16 @@ class YumBase(depsolve.Depsolve):
opo = po
if 'installed_by' in opo.yumdb_info:
po.yumdb_info.installed_by = opo.yumdb_info.installed_by
@@ -187925,7 +187959,7 @@ index 99039e0..bbd20f3 100644
# Remove old ones after installing new ones, so we can copy values.
for txmbr in self.tsInfo:
if txmbr.output_state in TS_INSTALL_STATES:
-@@ -1662,10 +2016,13 @@ class YumBase(depsolve.Depsolve):
+@@ -1662,10 +2011,13 @@ class YumBase(depsolve.Depsolve):
' but is not!' % txmbr.po))
# Note: Get Panu to do te.Failed() so we don't have to
txmbr.output_state = TS_FAILED
@@ -187939,7 +187973,7 @@ index 99039e0..bbd20f3 100644
self.verbose_logger.log(logginglevels.DEBUG_2, 'What is this? %s' % txmbr.po)
self.plugins.run('postverifytrans')
-@@ -1680,10 +2037,11 @@ class YumBase(depsolve.Depsolve):
+@@ -1680,10 +2032,11 @@ class YumBase(depsolve.Depsolve):
self.verbose_logger.debug('VerifyTransaction time: %0.3f' % (time.time() - vt_st))
def costExcludePackages(self):
@@ -187955,7 +187989,7 @@ index 99039e0..bbd20f3 100644
# if all the repo.costs are equal then don't bother running things
costs = {}
for r in self.repos.listEnabled():
-@@ -1705,10 +2063,12 @@ class YumBase(depsolve.Depsolve):
+@@ -1705,10 +2058,12 @@ class YumBase(depsolve.Depsolve):
done = True
def excludePackages(self, repo=None):
@@ -187971,7 +188005,7 @@ index 99039e0..bbd20f3 100644
if "all" in self.conf.disable_excludes:
return
-@@ -1735,9 +2095,14 @@ class YumBase(depsolve.Depsolve):
+@@ -1735,9 +2090,14 @@ class YumBase(depsolve.Depsolve):
self.pkgSack.addPackageExcluder(repoid, exid,'exclude.match', match)
def includePackages(self, repo):
@@ -187989,7 +188023,7 @@ index 99039e0..bbd20f3 100644
includelist = repo.getIncludePkgList()
if len(includelist) == 0:
-@@ -1757,8 +2122,11 @@ class YumBase(depsolve.Depsolve):
+@@ -1757,8 +2117,11 @@ class YumBase(depsolve.Depsolve):
self.pkgSack.addPackageExcluder(repo.id, exid, 'exclude.marked')
def doLock(self, lockfile = YUM_PID_FILE):
@@ -188003,10 +188037,11 @@ index 99039e0..bbd20f3 100644
if self.conf.uid != 0:
# If we are a user, assume we are using the root cache ... so don't
# bother locking.
-@@ -1774,38 +2142,26 @@ class YumBase(depsolve.Depsolve):
+@@ -1773,39 +2136,38 @@ class YumBase(depsolve.Depsolve):
+ lockfile = os.path.normpath(lockfile) # get rid of silly preceding extra /
mypid=str(os.getpid())
- while not self._lock(lockfile, mypid, 0644):
+- while not self._lock(lockfile, mypid, 0644):
- try:
- fd = open(lockfile, 'r')
- except (IOError, OSError), e:
@@ -188016,6 +188051,11 @@ index 99039e0..bbd20f3 100644
- try: oldpid = int(fd.readline())
- except ValueError:
- # bogus data in the pid file. Throw away.
++ while True:
++ ret = self._lock(lockfile, mypid, 0644)
++ if ret:
++ break
++
+ oldpid = self._get_locker(lockfile)
+ if not oldpid:
+ # Invalid locker: unlink lockfile and retry
@@ -188042,6 +188082,13 @@ index 99039e0..bbd20f3 100644
+ # Another copy seems to be running.
+ msg = _('Existing lock %s: another copy is running as pid %s.') % (lockfile, oldpid)
+ raise Errors.LockError(0, msg, oldpid)
++
++ if ret == 2:
++ # Means lockdir isn't setup, out of bad options just run without
++ # locks.
++ return
++
++ assert ret == 1
# We've got the lock, store it so we can auto-unlock on __del__...
self._lockfile = lockfile
@@ -188057,7 +188104,7 @@ index 99039e0..bbd20f3 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 +2186,69 @@ class YumBase(depsolve.Depsolve):
+@@ -1830,31 +2192,74 @@ class YumBase(depsolve.Depsolve):
self._unlock(lockfile)
self._lockfile = None
@@ -188067,7 +188114,13 @@ index 99039e0..bbd20f3 100644
lockdir = os.path.dirname(filename)
try:
if not os.path.exists(lockdir):
- os.makedirs(lockdir, mode=0755)
+- os.makedirs(lockdir, mode=0755)
++ # We use to os.makedirs(lockdir, mode=0755) ... but that causes
++ # problems now due to /var/run being a magic dir. with systemd.
++ # So we now just give up and run, hopefully nobody runs N
++ # instances before the magic dir. is activate.
++ return 2
++
fd = os.open(filename, os.O_EXCL|os.O_CREAT|os.O_WRONLY, mode)
+ os.write(fd, contents)
+ os.close(fd)
@@ -188138,7 +188191,7 @@ index 99039e0..bbd20f3 100644
failed = False
if type(fo) is types.InstanceType:
-@@ -1877,10 +2271,10 @@ class YumBase(depsolve.Depsolve):
+@@ -1877,10 +2282,10 @@ class YumBase(depsolve.Depsolve):
cursize = os.stat(fo)[6]
totsize = long(po.size)
if cursize >= totsize and not po.repo.cache:
@@ -188152,7 +188205,7 @@ index 99039e0..bbd20f3 100644
os.unlink(fo)
if raiseError:
-@@ -1894,9 +2288,16 @@ class YumBase(depsolve.Depsolve):
+@@ -1894,9 +2299,16 @@ class YumBase(depsolve.Depsolve):
def verifyChecksum(self, fo, checksumType, csum):
@@ -188172,7 +188225,7 @@ index 99039e0..bbd20f3 100644
try:
filesum = misc.checksum(checksumType, fo)
except Errors.MiscError, e:
-@@ -1908,13 +2309,26 @@ class YumBase(depsolve.Depsolve):
+@@ -1908,13 +2320,26 @@ class YumBase(depsolve.Depsolve):
return 0
def downloadPkgs(self, pkglist, callback=None, callback_total=None):
@@ -188200,7 +188253,7 @@ index 99039e0..bbd20f3 100644
if a is None:
return -1
if b is None:
-@@ -1925,12 +2339,11 @@ class YumBase(depsolve.Depsolve):
+@@ -1925,12 +2350,11 @@ class YumBase(depsolve.Depsolve):
return 1
return 0
@@ -188215,7 +188268,7 @@ index 99039e0..bbd20f3 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 +2356,196 @@ class YumBase(depsolve.Depsolve):
+@@ -1943,116 +2367,196 @@ class YumBase(depsolve.Depsolve):
self.history.close()
self.plugins.run('predownload', pkglist=pkglist)
@@ -188501,7 +188554,7 @@ index 99039e0..bbd20f3 100644
if type(fo) is types.InstanceType:
fo = fo.filename
-@@ -2076,9 +2569,12 @@ class YumBase(depsolve.Depsolve):
+@@ -2076,9 +2580,12 @@ class YumBase(depsolve.Depsolve):
return 1
def downloadHeader(self, po):
@@ -188516,7 +188569,7 @@ index 99039e0..bbd20f3 100644
if hasattr(po, 'pkgtype') and po.pkgtype == 'local':
return
-@@ -2122,15 +2618,17 @@ class YumBase(depsolve.Depsolve):
+@@ -2122,15 +2629,17 @@ class YumBase(depsolve.Depsolve):
return
def sigCheckPkg(self, po):
@@ -188542,7 +188595,7 @@ index 99039e0..bbd20f3 100644
if self._override_sigchecks:
check = False
hasgpgkey = 0
-@@ -2181,6 +2679,9 @@ class YumBase(depsolve.Depsolve):
+@@ -2181,6 +2690,9 @@ class YumBase(depsolve.Depsolve):
return result, msg
def cleanUsedHeadersPackages(self):
@@ -188552,7 +188605,7 @@ index 99039e0..bbd20f3 100644
filelist = []
for txmbr in self.tsInfo:
if txmbr.po.state not in TS_INSTALL_STATES:
-@@ -2189,6 +2690,8 @@ class YumBase(depsolve.Depsolve):
+@@ -2189,6 +2701,8 @@ class YumBase(depsolve.Depsolve):
continue
if txmbr.po.repoid not in self.repos.repos:
continue
@@ -188561,7 +188614,7 @@ index 99039e0..bbd20f3 100644
# make sure it's not a local file
repo = self.repos.repos[txmbr.po.repoid]
-@@ -2218,27 +2721,42 @@ class YumBase(depsolve.Depsolve):
+@@ -2218,27 +2732,42 @@ class YumBase(depsolve.Depsolve):
_('%s removed'), fn)
def cleanHeaders(self):
@@ -188606,7 +188659,7 @@ index 99039e0..bbd20f3 100644
cachedir = self.conf.persistdir + "/rpmdb-indexes/"
if not os.path.exists(cachedir):
filelist = []
-@@ -2271,9 +2789,31 @@ class YumBase(depsolve.Depsolve):
+@@ -2271,9 +2800,31 @@ class YumBase(depsolve.Depsolve):
return 0, [msg]
def doPackageLists(self, pkgnarrow='all', patterns=None, showdups=None,
@@ -188641,7 +188694,7 @@ index 99039e0..bbd20f3 100644
if showdups is None:
showdups = self.conf.showdupesfromrepos
ygh = misc.GenericHolder(iter=pkgnarrow)
-@@ -2295,6 +2835,8 @@ class YumBase(depsolve.Depsolve):
+@@ -2295,6 +2846,8 @@ class YumBase(depsolve.Depsolve):
ndinst = {} # Newest versions by name.arch
for po in self.rpmdb.returnPackages(patterns=patterns,
ignore_case=ic):
@@ -188650,7 +188703,7 @@ index 99039e0..bbd20f3 100644
dinst[po.pkgtup] = po
if showdups:
continue
-@@ -2304,8 +2846,13 @@ class YumBase(depsolve.Depsolve):
+@@ -2304,8 +2857,13 @@ class YumBase(depsolve.Depsolve):
installed = dinst.values()
if showdups:
@@ -188665,7 +188718,7 @@ index 99039e0..bbd20f3 100644
else:
try:
avail = self.pkgSack.returnNewestByNameArch(patterns=patterns,
-@@ -2323,16 +2870,31 @@ class YumBase(depsolve.Depsolve):
+@@ -2323,16 +2881,31 @@ class YumBase(depsolve.Depsolve):
key = (pkg.name, pkg.arch)
if pkg.pkgtup in dinst:
reinstall_available.append(pkg)
@@ -188700,7 +188753,7 @@ index 99039e0..bbd20f3 100644
if len(matches) > 1:
updates.append(matches[0])
self.verbose_logger.log(logginglevels.DEBUG_1,
-@@ -2352,13 +2914,19 @@ class YumBase(depsolve.Depsolve):
+@@ -2352,13 +2925,19 @@ class YumBase(depsolve.Depsolve):
elif pkgnarrow == 'installed':
installed = self.rpmdb.returnPackages(patterns=patterns,
ignore_case=ic)
@@ -188721,7 +188774,7 @@ index 99039e0..bbd20f3 100644
else:
try:
avail = self.pkgSack.returnNewestByNameArch(patterns=patterns,
-@@ -2392,9 +2960,21 @@ class YumBase(depsolve.Depsolve):
+@@ -2392,9 +2971,21 @@ class YumBase(depsolve.Depsolve):
avail = set(avail)
for po in self.rpmdb.returnPackages(patterns=patterns,
ignore_case=ic):
@@ -188743,7 +188796,7 @@ index 99039e0..bbd20f3 100644
# obsoleting packages (and what they obsolete)
elif pkgnarrow == 'obsoletes':
self.conf.obsoletes = 1
-@@ -2402,6 +2982,7 @@ class YumBase(depsolve.Depsolve):
+@@ -2402,6 +2993,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)
@@ -188751,7 +188804,7 @@ index 99039e0..bbd20f3 100644
instpo = self.getInstalledPackageObject(instTup)
for po in pkgs:
obsoletes.append(po)
-@@ -2433,7 +3014,12 @@ class YumBase(depsolve.Depsolve):
+@@ -2433,7 +3025,12 @@ class YumBase(depsolve.Depsolve):
recentlimit = now-(self.conf.recent*86400)
if showdups:
avail = self.pkgSack.returnPackages(patterns=patterns,
@@ -188765,7 +188818,7 @@ index 99039e0..bbd20f3 100644
else:
try:
avail = self.pkgSack.returnNewestByNameArch(patterns=patterns,
-@@ -2461,14 +3047,13 @@ class YumBase(depsolve.Depsolve):
+@@ -2461,14 +3058,13 @@ class YumBase(depsolve.Depsolve):
def findDeps(self, pkgs):
@@ -188785,7 +188838,7 @@ index 99039e0..bbd20f3 100644
results = {}
for pkg in pkgs:
-@@ -2495,10 +3080,22 @@ class YumBase(depsolve.Depsolve):
+@@ -2495,10 +3091,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):
@@ -188812,7 +188865,7 @@ index 99039e0..bbd20f3 100644
sql_fields = []
for f in fields:
sql_fields.append(RPM_TO_SQLITE.get(f, f))
-@@ -2614,7 +3211,7 @@ class YumBase(depsolve.Depsolve):
+@@ -2614,7 +3222,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.
@@ -188821,7 +188874,7 @@ index 99039e0..bbd20f3 100644
# either, so it's pretty thankless. HTH. HAND.
# By default just sort using package sorting
sort_func = operator.itemgetter(0)
-@@ -2661,6 +3258,14 @@ class YumBase(depsolve.Depsolve):
+@@ -2661,6 +3269,14 @@ class YumBase(depsolve.Depsolve):
yield (po, vs)
def searchPackageTags(self, criteria):
@@ -188836,7 +188889,7 @@ index 99039e0..bbd20f3 100644
results = {} # name = [(criteria, taglist)]
for c in criteria:
c = c.lower()
-@@ -2677,11 +3282,16 @@ class YumBase(depsolve.Depsolve):
+@@ -2677,11 +3293,16 @@ class YumBase(depsolve.Depsolve):
return results
def searchPackages(self, fields, criteria, callback=None):
@@ -188858,7 +188911,7 @@ index 99039e0..bbd20f3 100644
warnings.warn(_('searchPackages() will go away in a future version of Yum.\
Use searchGenerator() instead. \n'),
Errors.YumFutureDeprecationWarning, stacklevel=2)
-@@ -2700,13 +3310,23 @@ class YumBase(depsolve.Depsolve):
+@@ -2700,13 +3321,23 @@ class YumBase(depsolve.Depsolve):
def searchPackageProvides(self, args, callback=None,
callback_has_matchfor=False):
@@ -188886,7 +188939,7 @@ index 99039e0..bbd20f3 100644
else:
isglob = True
canBeFile = misc.re_filename(arg)
-@@ -2723,7 +3343,7 @@ class YumBase(depsolve.Depsolve):
+@@ -2723,7 +3354,7 @@ class YumBase(depsolve.Depsolve):
where = self.returnPackagesByDep(arg)
else:
usedDepString = False
@@ -188895,7 +188948,7 @@ index 99039e0..bbd20f3 100644
self.verbose_logger.log(logginglevels.DEBUG_1,
P_('Searching %d package', 'Searching %d packages', len(where)), len(where))
-@@ -2817,25 +3437,166 @@ class YumBase(depsolve.Depsolve):
+@@ -2817,25 +3448,166 @@ class YumBase(depsolve.Depsolve):
return matches
@@ -189074,7 +189127,7 @@ index 99039e0..bbd20f3 100644
if uservisible:
if grp.user_visible:
installed.append(grp)
-@@ -2847,34 +3608,97 @@ class YumBase(depsolve.Depsolve):
+@@ -2847,34 +3619,97 @@ class YumBase(depsolve.Depsolve):
available.append(grp)
else:
available.append(grp)
@@ -189180,7 +189233,7 @@ index 99039e0..bbd20f3 100644
thesegroups = self.comps.return_groups(grpid)
if not thesegroups:
raise Errors.GroupsError, _("No Group named %s exists") % to_unicode(grpid)
-@@ -2898,18 +3722,53 @@ class YumBase(depsolve.Depsolve):
+@@ -2898,18 +3733,53 @@ class YumBase(depsolve.Depsolve):
self.tsInfo.remove(txmbr.po.pkgtup)
@@ -189244,7 +189297,7 @@ index 99039e0..bbd20f3 100644
txmbrs_used = []
thesegroups = self.comps.return_groups(grpid)
-@@ -2920,12 +3779,18 @@ class YumBase(depsolve.Depsolve):
+@@ -2920,12 +3790,18 @@ class YumBase(depsolve.Depsolve):
if group_package_types:
package_types = group_package_types
@@ -189263,7 +189316,7 @@ index 99039e0..bbd20f3 100644
pkgs = []
if 'mandatory' in package_types:
pkgs.extend(thisgroup.mandatory_packages)
-@@ -2934,12 +3799,56 @@ class YumBase(depsolve.Depsolve):
+@@ -2934,12 +3810,56 @@ class YumBase(depsolve.Depsolve):
if 'optional' in package_types:
pkgs.extend(thisgroup.optional_packages)
@@ -189321,7 +189374,7 @@ index 99039e0..bbd20f3 100644
except Errors.InstallError, e:
self.verbose_logger.debug(_('No package named %s available to be installed'),
pkg)
-@@ -2953,7 +3862,9 @@ class YumBase(depsolve.Depsolve):
+@@ -2953,7 +3873,9 @@ class YumBase(depsolve.Depsolve):
group_conditionals = enable_group_conditionals
count_cond_test = 0
@@ -189332,7 +189385,7 @@ index 99039e0..bbd20f3 100644
for condreq, cond in thisgroup.conditional_packages.iteritems():
if self.isPackageInstalled(cond):
try:
-@@ -2990,17 +3901,23 @@ class YumBase(depsolve.Depsolve):
+@@ -2990,17 +3912,23 @@ class YumBase(depsolve.Depsolve):
if cond not in self.tsInfo.conditionals:
self.tsInfo.conditionals[cond] = []
self.tsInfo.conditionals[cond].extend(pkgs)
@@ -189363,7 +189416,7 @@ index 99039e0..bbd20f3 100644
if not self.comps.has_group(grpid):
raise Errors.GroupsError, _("No Group named %s exists") % to_unicode(grpid)
-@@ -3008,7 +3925,8 @@ class YumBase(depsolve.Depsolve):
+@@ -3008,7 +3936,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)
@@ -189373,7 +189426,7 @@ index 99039e0..bbd20f3 100644
for thisgroup in thesegroups:
thisgroup.selected = False
-@@ -3034,13 +3952,114 @@ class YumBase(depsolve.Depsolve):
+@@ -3034,13 +3963,114 @@ class YumBase(depsolve.Depsolve):
for pkg in self.tsInfo.conditionals.get(txmbr.name, []):
self.tsInfo.remove(pkg.pkgtup)
@@ -189494,7 +189547,7 @@ index 99039e0..bbd20f3 100644
# look it up in the self.localPackages first:
for po in self.localPackages:
if po.pkgtup == pkgtup:
-@@ -3049,7 +4068,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3049,7 +4079,7 @@ class YumBase(depsolve.Depsolve):
pkgs = self.pkgSack.searchPkgTuple(pkgtup)
if len(pkgs) == 0:
@@ -189503,7 +189556,7 @@ index 99039e0..bbd20f3 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 +4084,21 @@ class YumBase(depsolve.Depsolve):
+@@ -3065,13 +4095,21 @@ class YumBase(depsolve.Depsolve):
return result
def getInstalledPackageObject(self, pkgtup):
@@ -189530,7 +189583,7 @@ index 99039e0..bbd20f3 100644
raise Errors.RpmDBError, _('Package tuple %s could not be found in rpmdb') % str(pkgtup)
# Dito. FIXME from getPackageObject() for len() > 1 ... :)
-@@ -3079,9 +4106,11 @@ class YumBase(depsolve.Depsolve):
+@@ -3079,9 +4117,11 @@ class YumBase(depsolve.Depsolve):
return po
def gpgKeyCheck(self):
@@ -189544,7 +189597,7 @@ index 99039e0..bbd20f3 100644
gpgkeyschecked = self.conf.cachedir + '/.gpgkeyschecked.yum'
if os.path.exists(gpgkeyschecked):
return 1
-@@ -3106,9 +4135,13 @@ class YumBase(depsolve.Depsolve):
+@@ -3106,9 +4146,13 @@ class YumBase(depsolve.Depsolve):
return 1
def returnPackagesByDep(self, depstring):
@@ -189560,7 +189613,7 @@ index 99039e0..bbd20f3 100644
if not depstring:
return []
-@@ -3132,12 +4165,23 @@ class YumBase(depsolve.Depsolve):
+@@ -3132,12 +4176,23 @@ class YumBase(depsolve.Depsolve):
raise Errors.YumBaseError, _('Invalid version flag from: %s') % str(depstring)
depflags = SYMBOLFLAGS[flagsymbol]
@@ -189587,7 +189640,7 @@ index 99039e0..bbd20f3 100644
# we get all sorts of randomness here
errstring = depstring
if type(depstring) not in types.StringTypes:
-@@ -3149,16 +4193,22 @@ class YumBase(depsolve.Depsolve):
+@@ -3149,16 +4204,22 @@ class YumBase(depsolve.Depsolve):
raise Errors.YumBaseError, _('No Package found for %s') % errstring
ps = ListPackageSack(pkglist)
@@ -189614,7 +189667,7 @@ index 99039e0..bbd20f3 100644
if not depstring:
return []
-@@ -3182,14 +4232,53 @@ class YumBase(depsolve.Depsolve):
+@@ -3182,14 +4243,53 @@ class YumBase(depsolve.Depsolve):
raise Errors.YumBaseError, _('Invalid version flag from: %s') % str(depstring)
depflags = SYMBOLFLAGS[flagsymbol]
@@ -189670,7 +189723,7 @@ index 99039e0..bbd20f3 100644
if len(pkglist) == 0:
-@@ -3198,14 +4287,23 @@ class YumBase(depsolve.Depsolve):
+@@ -3198,14 +4298,23 @@ class YumBase(depsolve.Depsolve):
if len(pkglist) == 1:
return pkglist[0]
@@ -189700,7 +189753,7 @@ index 99039e0..bbd20f3 100644
returnlist = []
compatArchList = self.arch.get_arch_list(arch)
multiLib = []
-@@ -3222,9 +4320,9 @@ class YumBase(depsolve.Depsolve):
+@@ -3222,9 +4331,9 @@ class YumBase(depsolve.Depsolve):
singleLib.append(po)
# we now have three lists. find the best package(s) of each
@@ -189713,7 +189766,7 @@ index 99039e0..bbd20f3 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 +4336,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3238,7 +4347,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:
@@ -189722,7 +189775,7 @@ index 99039e0..bbd20f3 100644
if best.arch == "noarch":
returnlist.append(no)
else:
-@@ -3246,7 +4344,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3246,7 +4355,7 @@ class YumBase(depsolve.Depsolve):
if single: returnlist.append(single)
# similar for the non-multilib case
elif single:
@@ -189731,7 +189784,7 @@ index 99039e0..bbd20f3 100644
if best.arch == "noarch":
returnlist.append(no)
else:
-@@ -3350,28 +4448,76 @@ class YumBase(depsolve.Depsolve):
+@@ -3350,28 +4459,71 @@ class YumBase(depsolve.Depsolve):
done = True
slow = next_func(slow)
@@ -189741,12 +189794,20 @@ index 99039e0..bbd20f3 100644
- def _at_groupinstall(self, pattern):
- " Do groupinstall via. leading @ on the cmd line, for install/update."
++ def _try_bold(self, string_):
++ """Attempt to make the string look bold in terminal."""
++ if hasattr(self, 'term'):
++ return '%s%s%s' % (self.term.MODE['bold'], string_, self.term.MODE['normal'])
++ return string_
++
+ def _at_groupinstall(self, pattern, upgrade=False):
+ " Do groupinstall via. leading @ on the cmd line, for install."
assert pattern[0] == '@'
group_string = pattern[1:]
tx_return = []
- for group in self.comps.return_groups(group_string):
+- try:
+- txmbrs = self.selectGroup(group.groupid)
+
+ try: comps = self.comps
+ except yum.Errors.GroupsError, e:
@@ -189755,45 +189816,35 @@ index 99039e0..bbd20f3 100644
+ self.logger.warning(e)
+ return tx_return
+
++ found = False
+ if group_string and group_string[0] == '^':
+ group_string = group_string[1:]
+ # Actually dealing with "environment groups".
-+ found = False
+ for env_grp in comps.return_environments(group_string):
+ found = True
-+ try:
-+ txmbrs = self.selectEnvironment(env_grp.environmentid,
-+ upgrade=upgrade)
-+ tx_return.extend(txmbrs)
-+ except yum.Errors.GroupsError:
-+ assert False, "Checked in for loop."
-+ continue
-+ if not found:
-+ self.logger.error(_('Warning: Environment group %s does not exist.'),
-+ group_string)
-+ return tx_return
-+
-+ found = False
-+ for group in comps.return_groups(group_string):
-+ found = True
- try:
-- txmbrs = self.selectGroup(group.groupid)
-+ txmbrs = self.selectGroup(group.groupid, upgrade=upgrade)
++ txmbrs = self.selectEnvironment(env_grp.environmentid,
++ upgrade=upgrade)
tx_return.extend(txmbrs)
- except yum.Errors.GroupsError:
+- except yum.Errors.GroupsError:
- self.logger.critical(_('Warning: Group %s does not exist.'), group_string)
-+ assert False, "Checked in for loop."
- continue
+- continue
++ else:
++ for group in comps.return_groups(group_string):
++ found = True
++ txmbrs = self.selectGroup(group.groupid, upgrade=upgrade)
++ tx_return.extend(txmbrs)
+ if not found:
-+ self.logger.error(_('Warning: Package group %s does not exist.'),
-+ group_string)
-+
++ raise Errors.GroupInstallError, _('Group %s does not exist.') % self._try_bold(group_string)
return tx_return
-
+
+ def _at_groupupgrade(self, pattern):
+ " Do group upgrade via. leading @ on the cmd line, for update."
-+ return self._at_groupinstall(pattern, upgrade=True)
++ try:
++ return self._at_groupinstall(pattern, upgrade=True)
++ except Errors.GroupInstallError, e:
++ self.logger.warning(_('Warning: %s'), e)
++ return []
+
def _at_groupremove(self, pattern):
" Do groupremove via. leading @ on the cmd line, for remove."
@@ -189815,7 +189866,7 @@ index 99039e0..bbd20f3 100644
try:
txmbrs = self.groupRemove(group_string)
except yum.Errors.GroupsError:
-@@ -3387,6 +4533,8 @@ class YumBase(depsolve.Depsolve):
+@@ -3387,6 +4539,8 @@ class YumBase(depsolve.Depsolve):
assert pattern[0] == '@'
grpid = pattern[1:]
@@ -189824,7 +189875,7 @@ index 99039e0..bbd20f3 100644
thesegroups = self.comps.return_groups(grpid)
if not thesegroups:
raise Errors.GroupsError, _("No Group named %s exists") % to_unicode(grpid)
-@@ -3398,7 +4546,11 @@ class YumBase(depsolve.Depsolve):
+@@ -3398,7 +4552,11 @@ class YumBase(depsolve.Depsolve):
def _minus_deselect(self, pattern):
""" Remove things from the transaction, like kickstart. """
assert pattern[0] == '-'
@@ -189837,7 +189888,7 @@ index 99039e0..bbd20f3 100644
if pat and pat[0] == '@':
pat = pat[1:]
-@@ -3437,14 +4589,87 @@ class YumBase(depsolve.Depsolve):
+@@ -3437,14 +4595,87 @@ class YumBase(depsolve.Depsolve):
if flag not in self.tsInfo.probFilterFlags:
self.tsInfo.probFilterFlags.append(flag)
@@ -189931,7 +189982,7 @@ index 99039e0..bbd20f3 100644
pkgs = []
was_pattern = False
if po:
-@@ -3464,9 +4689,14 @@ class YumBase(depsolve.Depsolve):
+@@ -3464,9 +4695,14 @@ class YumBase(depsolve.Depsolve):
if kwargs['pattern'] and kwargs['pattern'][0] == '@':
return self._at_groupinstall(kwargs['pattern'])
@@ -189946,7 +189997,7 @@ index 99039e0..bbd20f3 100644
ignore_case=False)
pkgs.extend(mypkgs)
# if we have anything left unmatched, let's take a look for it
-@@ -3477,20 +4707,12 @@ class YumBase(depsolve.Depsolve):
+@@ -3477,20 +4713,12 @@ class YumBase(depsolve.Depsolve):
self.verbose_logger.debug(_('Checking for virtual provide or file-provide for %s'),
arg)
@@ -189973,7 +190024,7 @@ index 99039e0..bbd20f3 100644
else:
nevra_dict = self._nevra_kwarg_parse(kwargs)
-@@ -3499,6 +4721,8 @@ class YumBase(depsolve.Depsolve):
+@@ -3499,6 +4727,8 @@ class YumBase(depsolve.Depsolve):
ver=nevra_dict['version'], rel=nevra_dict['release'])
self._add_not_found_a(pkgs, nevra_dict)
@@ -189982,7 +190033,7 @@ index 99039e0..bbd20f3 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 +4801,21 @@ class YumBase(depsolve.Depsolve):
+@@ -3577,17 +4807,21 @@ class YumBase(depsolve.Depsolve):
continue
# make sure this shouldn't be passed to update:
@@ -190008,7 +190059,7 @@ index 99039e0..bbd20f3 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 +4828,23 @@ class YumBase(depsolve.Depsolve):
+@@ -3600,23 +4834,23 @@ class YumBase(depsolve.Depsolve):
already_obs = pkgs[0]
if already_obs:
@@ -190039,7 +190090,7 @@ index 99039e0..bbd20f3 100644
continue
# make sure we don't have a name.arch of this already installed
-@@ -3630,8 +4858,8 @@ class YumBase(depsolve.Depsolve):
+@@ -3630,8 +4864,8 @@ class YumBase(depsolve.Depsolve):
found = True
break
if not found:
@@ -190050,7 +190101,7 @@ index 99039e0..bbd20f3 100644
tx_return.extend(txmbrs)
continue
-@@ -3719,19 +4947,47 @@ class YumBase(depsolve.Depsolve):
+@@ -3719,19 +4953,47 @@ class YumBase(depsolve.Depsolve):
return txmbr
def update(self, po=None, requiringPo=None, update_to=False, **kwargs):
@@ -190105,7 +190156,7 @@ index 99039e0..bbd20f3 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 +5021,15 @@ class YumBase(depsolve.Depsolve):
+@@ -3765,7 +5027,15 @@ class YumBase(depsolve.Depsolve):
if new is None:
continue
tx_return.extend(self.update(po=new))
@@ -190122,7 +190173,7 @@ index 99039e0..bbd20f3 100644
return tx_return
# complications
-@@ -3787,13 +5051,16 @@ class YumBase(depsolve.Depsolve):
+@@ -3787,13 +5057,16 @@ class YumBase(depsolve.Depsolve):
return self._minus_deselect(kwargs['pattern'])
if kwargs['pattern'] and kwargs['pattern'][0] == '@':
@@ -190141,7 +190192,7 @@ index 99039e0..bbd20f3 100644
if not instpkgs and not availpkgs:
depmatches = []
-@@ -3805,6 +5072,8 @@ class YumBase(depsolve.Depsolve):
+@@ -3805,6 +5078,8 @@ class YumBase(depsolve.Depsolve):
except yum.Errors.YumBaseError, e:
self.logger.critical(_('%s') % e)
@@ -190150,7 +190201,7 @@ index 99039e0..bbd20f3 100644
if update_to:
availpkgs.extend(depmatches)
else:
-@@ -3816,9 +5085,12 @@ class YumBase(depsolve.Depsolve):
+@@ -3816,9 +5091,12 @@ class YumBase(depsolve.Depsolve):
try:
if update_to:
m = []
@@ -190164,7 +190215,7 @@ index 99039e0..bbd20f3 100644
m = self.pkgSack.returnNewestByNameArch(patterns=pats)
except Errors.PackageSackError:
m = []
-@@ -3843,7 +5115,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3843,7 +5121,7 @@ class YumBase(depsolve.Depsolve):
availpkgs = self._compare_providers(availpkgs, requiringPo)
availpkgs = map(lambda x: x[0], availpkgs)
elif not availpkgs:
@@ -190173,7 +190224,7 @@ index 99039e0..bbd20f3 100644
# for any thing specified
# get the list of available pkgs matching it (or take the po)
-@@ -3879,6 +5151,7 @@ class YumBase(depsolve.Depsolve):
+@@ -3879,6 +5157,7 @@ class YumBase(depsolve.Depsolve):
if obsoleting_pkg is None:
continue
obs_pkgs.append(obsoleting_pkg)
@@ -190181,7 +190232,7 @@ index 99039e0..bbd20f3 100644
for obsoleting_pkg in packagesNewestByName(obs_pkgs):
tx_return.extend(self.install(po=obsoleting_pkg))
for available_pkg in availpkgs:
-@@ -3920,11 +5193,29 @@ class YumBase(depsolve.Depsolve):
+@@ -3920,11 +5199,29 @@ class YumBase(depsolve.Depsolve):
tx_return.append(txmbr)
for available_pkg in availpkgs:
@@ -190211,7 +190262,7 @@ index 99039e0..bbd20f3 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 +5276,18 @@ class YumBase(depsolve.Depsolve):
+@@ -3985,11 +5282,18 @@ class YumBase(depsolve.Depsolve):
return tx_return
def remove(self, po=None, **kwargs):
@@ -190235,7 +190286,7 @@ index 99039e0..bbd20f3 100644
if not po and not kwargs:
raise Errors.RemoveError, 'Nothing specified to remove'
-@@ -4008,6 +5306,10 @@ class YumBase(depsolve.Depsolve):
+@@ -4008,6 +5312,10 @@ class YumBase(depsolve.Depsolve):
return self._at_groupremove(kwargs['pattern'])
(e,m,u) = self.rpmdb.matchPackageNames([kwargs['pattern']])
@@ -190246,7 +190297,7 @@ index 99039e0..bbd20f3 100644
pkgs.extend(e)
pkgs.extend(m)
if u:
-@@ -4018,6 +5320,10 @@ class YumBase(depsolve.Depsolve):
+@@ -4018,6 +5326,10 @@ class YumBase(depsolve.Depsolve):
except yum.Errors.YumBaseError, e:
self.logger.critical(_('%s') % e)
@@ -190257,7 +190308,7 @@ index 99039e0..bbd20f3 100644
if not depmatches:
arg = to_unicode(arg)
self.logger.critical(_('No Match for argument: %s') % to_unicode(arg))
-@@ -4055,17 +5361,19 @@ class YumBase(depsolve.Depsolve):
+@@ -4055,17 +5367,19 @@ class YumBase(depsolve.Depsolve):
return tx_return
def installLocal(self, pkg, po=None, updateonly=False):
@@ -190287,7 +190338,7 @@ index 99039e0..bbd20f3 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 +5491,15 @@ class YumBase(depsolve.Depsolve):
+@@ -4183,16 +5497,15 @@ class YumBase(depsolve.Depsolve):
return tx_return
def reinstallLocal(self, pkg, po=None):
@@ -190312,7 +190363,7 @@ index 99039e0..bbd20f3 100644
if not po:
try:
po = YumUrlPackage(self, ts=self.rpmdb.readOnlyTS(), url=pkg,
-@@ -4215,13 +5522,29 @@ class YumBase(depsolve.Depsolve):
+@@ -4215,13 +5528,29 @@ class YumBase(depsolve.Depsolve):
return self.reinstall(po=po)
def reinstall(self, po=None, **kwargs):
@@ -190345,7 +190396,7 @@ index 99039e0..bbd20f3 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 +5563,11 @@ class YumBase(depsolve.Depsolve):
+@@ -4240,10 +5569,11 @@ class YumBase(depsolve.Depsolve):
# pkgs that are obsolete.
old_conf_obs = self.conf.obsoletes
self.conf.obsoletes = False
@@ -190359,7 +190410,7 @@ index 99039e0..bbd20f3 100644
self.conf.obsoletes = old_conf_obs
if len(members) == 0:
self.tsInfo.remove(item.pkgtup)
-@@ -4259,16 +5583,15 @@ class YumBase(depsolve.Depsolve):
+@@ -4259,16 +5589,15 @@ class YumBase(depsolve.Depsolve):
return tx_mbrs
def downgradeLocal(self, pkg, po=None):
@@ -190384,7 +190435,7 @@ index 99039e0..bbd20f3 100644
if not po:
try:
po = YumUrlPackage(self, ts=self.rpmdb.readOnlyTS(), url=pkg,
-@@ -4309,13 +5632,19 @@ class YumBase(depsolve.Depsolve):
+@@ -4309,13 +5638,19 @@ class YumBase(depsolve.Depsolve):
return False
def downgrade(self, po=None, **kwargs):
@@ -190411,7 +190462,7 @@ index 99039e0..bbd20f3 100644
if not po and not kwargs:
raise Errors.DowngradeError, 'Nothing specified to downgrade'
-@@ -4397,6 +5726,10 @@ class YumBase(depsolve.Depsolve):
+@@ -4397,6 +5732,10 @@ class YumBase(depsolve.Depsolve):
# installed version. Indexed fromn the latest installed pkgtup.
downgrade_apkgs = {}
for pkg in sorted(apkgs):
@@ -190422,7 +190473,7 @@ index 99039e0..bbd20f3 100644
na = (pkg.name, pkg.arch)
# Here we allow downgrades from .i386 => .noarch, or .i586 => .i386
-@@ -4421,6 +5754,9 @@ class YumBase(depsolve.Depsolve):
+@@ -4421,6 +5760,9 @@ class YumBase(depsolve.Depsolve):
warned_nas.add(na)
continue
@@ -190432,7 +190483,7 @@ index 99039e0..bbd20f3 100644
if pkg.verGE(lipkg):
if na not in warned_nas:
msg = _('Only Upgrade available on package: %s') % pkg
-@@ -4457,7 +5793,7 @@ class YumBase(depsolve.Depsolve):
+@@ -4457,7 +5799,7 @@ class YumBase(depsolve.Depsolve):
if e and v and r:
evr = '%s:%s-%s' % (e, v, r)
elif v and r:
@@ -190441,7 +190492,7 @@ index 99039e0..bbd20f3 100644
elif e and v:
evr = '%s:%s' % (e, v)
elif v: # e and r etc. is just too weird to print
-@@ -4500,12 +5836,24 @@ class YumBase(depsolve.Depsolve):
+@@ -4500,12 +5842,24 @@ class YumBase(depsolve.Depsolve):
return returndict
@@ -190469,7 +190520,7 @@ index 99039e0..bbd20f3 100644
old_conf_obs = self.conf.obsoletes
self.conf.obsoletes = False
done = False
-@@ -4515,19 +5863,46 @@ class YumBase(depsolve.Depsolve):
+@@ -4515,19 +5869,46 @@ class YumBase(depsolve.Depsolve):
done = True
for pkg in transaction.trans_data:
if pkg.state == 'Downgrade':
@@ -190516,7 +190567,7 @@ index 99039e0..bbd20f3 100644
if self.install(pkgtup=pkg.pkgtup):
done = True
for pkg in transaction.trans_data:
-@@ -4538,8 +5913,14 @@ class YumBase(depsolve.Depsolve):
+@@ -4538,8 +5919,14 @@ class YumBase(depsolve.Depsolve):
return done
def history_undo(self, transaction):
@@ -190533,7 +190584,7 @@ index 99039e0..bbd20f3 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 +5997,7 @@ class YumBase(depsolve.Depsolve):
+@@ -4616,7 +6003,7 @@ class YumBase(depsolve.Depsolve):
except urlgrabber.grabber.URLGrabError, e:
raise Errors.YumBaseError(_('GPG key retrieval failed: ') +
@@ -190542,7 +190593,7 @@ index 99039e0..bbd20f3 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 +6030,7 @@ class YumBase(depsolve.Depsolve):
+@@ -4649,7 +6036,7 @@ class YumBase(depsolve.Depsolve):
keys_info = misc.getgpgkeyinfo(rawkey, multiple=True)
except ValueError, e:
raise Errors.YumBaseError(_('Invalid GPG Key from %s: %s') %
@@ -190551,7 +190602,7 @@ index 99039e0..bbd20f3 100644
keys = []
for keyinfo in keys_info:
thiskey = {}
-@@ -4674,39 +6055,49 @@ class YumBase(depsolve.Depsolve):
+@@ -4674,39 +6061,49 @@ class YumBase(depsolve.Depsolve):
if pkgs:
pkgs = sorted(pkgs)[-1]
msg = (_('Importing %s key 0x%s:\n'
@@ -190619,7 +190670,7 @@ index 99039e0..bbd20f3 100644
user_cb_fail = False
for keyurl in keyurls:
keys = self._retrievePublicKey(keyurl, repo)
-@@ -4725,7 +6116,9 @@ class YumBase(depsolve.Depsolve):
+@@ -4725,7 +6122,9 @@ class YumBase(depsolve.Depsolve):
# Try installing/updating GPG key
self._getKeyImportMessage(info, keyurl)
rc = False
@@ -190630,7 +190681,7 @@ index 99039e0..bbd20f3 100644
rc = True
# grab the .sig/.asc for the keyurl, if it exists
-@@ -4751,8 +6144,8 @@ class YumBase(depsolve.Depsolve):
+@@ -4751,8 +6150,8 @@ class YumBase(depsolve.Depsolve):
ts = self.rpmdb.readOnlyTS()
result = ts.pgpImportPubkey(misc.procgpgkey(info['raw_key']))
if result != 0:
@@ -190641,7 +190692,7 @@ index 99039e0..bbd20f3 100644
self.logger.info(_('Key imported successfully'))
key_installed = True
-@@ -4760,18 +6153,20 @@ class YumBase(depsolve.Depsolve):
+@@ -4760,18 +6159,20 @@ class YumBase(depsolve.Depsolve):
raise Errors.YumBaseError, _("Didn't install any keys")
if not key_installed:
@@ -190667,7 +190718,7 @@ index 99039e0..bbd20f3 100644
def _getAnyKeyForRepo(self, repo, destdir, keyurl_list, is_cakey=False, callback=None):
"""
-@@ -4788,6 +6183,18 @@ class YumBase(depsolve.Depsolve):
+@@ -4788,6 +6189,18 @@ class YumBase(depsolve.Depsolve):
"""
key_installed = False
@@ -190686,7 +190737,7 @@ index 99039e0..bbd20f3 100644
user_cb_fail = False
for keyurl in keyurl_list:
keys = self._retrievePublicKey(keyurl, repo, getSig=not is_cakey)
-@@ -4819,8 +6226,11 @@ class YumBase(depsolve.Depsolve):
+@@ -4819,8 +6232,11 @@ class YumBase(depsolve.Depsolve):
if not key_installed:
self._getKeyImportMessage(info, keyurl, keytype)
rc = False
@@ -190699,7 +190750,7 @@ index 99039e0..bbd20f3 100644
elif callback:
rc = callback({"repo": repo, "userid": info['userid'],
"hexkeyid": info['hexkeyid'], "keyurl": keyurl,
-@@ -4835,7 +6245,8 @@ class YumBase(depsolve.Depsolve):
+@@ -4835,7 +6251,8 @@ class YumBase(depsolve.Depsolve):
# Import the key
result = misc.import_key_to_pubring(info['raw_key'], info['hexkeyid'], gpgdir=destdir)
if not result:
@@ -190709,7 +190760,7 @@ index 99039e0..bbd20f3 100644
self.logger.info(_('Key imported successfully'))
key_installed = True
# write out the key id to imported_cakeys in the repos basedir
-@@ -4851,36 +6262,35 @@ class YumBase(depsolve.Depsolve):
+@@ -4851,36 +6268,35 @@ class YumBase(depsolve.Depsolve):
pass
if not key_installed and user_cb_fail:
@@ -190762,7 +190813,7 @@ index 99039e0..bbd20f3 100644
self._getAnyKeyForRepo(repo, repo.gpgcadir, repo.gpgcakey, is_cakey=True, callback=callback)
def _limit_installonly_pkgs(self):
-@@ -4889,7 +6299,7 @@ class YumBase(depsolve.Depsolve):
+@@ -4889,7 +6305,7 @@ class YumBase(depsolve.Depsolve):
New in 3.2.24: Obey yumdb_info.installonly data. """
def _sort_and_filter_installonly(pkgs):
@@ -190771,7 +190822,7 @@ index 99039e0..bbd20f3 100644
using the yumdb. """
ret_beg = []
ret_mid = []
-@@ -4917,6 +6327,10 @@ class YumBase(depsolve.Depsolve):
+@@ -4917,6 +6333,10 @@ class YumBase(depsolve.Depsolve):
if self.conf.installonly_limit < 1 :
return
@@ -190782,7 +190833,7 @@ index 99039e0..bbd20f3 100644
toremove = []
# We "probably" want to use either self.ts or self.rpmdb.ts if either
-@@ -4926,23 +6340,30 @@ class YumBase(depsolve.Depsolve):
+@@ -4926,23 +6346,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)
@@ -190821,7 +190872,7 @@ index 99039e0..bbd20f3 100644
for po in installed:
if (po.version, po.release) == (cur_kernel_v, cur_kernel_r):
# don't remove running
-@@ -4959,19 +6380,22 @@ class YumBase(depsolve.Depsolve):
+@@ -4959,19 +6386,22 @@ class YumBase(depsolve.Depsolve):
txmbr.depends_on.append(rel)
def processTransaction(self, callback=None,rpmTestDisplay=None, rpmDisplay=None):
@@ -190857,7 +190908,7 @@ index 99039e0..bbd20f3 100644
if not callback:
callback = callbacks.ProcessTransNoOutputCallback()
-@@ -5062,8 +6486,8 @@ class YumBase(depsolve.Depsolve):
+@@ -5062,8 +6492,8 @@ class YumBase(depsolve.Depsolve):
raise Errors.YumRPMCheckError, retmsgs
retmsgs = [_('ERROR with transaction check vs depsolve:')]
retmsgs.extend(msgs)
@@ -190868,7 +190919,7 @@ index 99039e0..bbd20f3 100644
raise Errors.YumRPMCheckError,retmsgs
tsConf = {}
-@@ -5114,13 +6538,19 @@ class YumBase(depsolve.Depsolve):
+@@ -5114,13 +6544,19 @@ class YumBase(depsolve.Depsolve):
return results
def add_enable_repo(self, repoid, baseurls=[], mirrorlist=None, **kwargs):
@@ -190895,7 +190946,7 @@ index 99039e0..bbd20f3 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 +6597,15 @@ class YumBase(depsolve.Depsolve):
+@@ -5167,9 +6603,15 @@ class YumBase(depsolve.Depsolve):
def setCacheDir(self, force=False, tmpdir=None, reuse=True,
suffix='/$basearch/$releasever'):
@@ -190914,7 +190965,7 @@ index 99039e0..bbd20f3 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 +6615,7 @@ class YumBase(depsolve.Depsolve):
+@@ -5179,7 +6621,7 @@ class YumBase(depsolve.Depsolve):
try:
cachedir = misc.getCacheDir(tmpdir, reuse)
except (IOError, OSError), e:
@@ -190923,7 +190974,7 @@ index 99039e0..bbd20f3 100644
cachedir = None
if cachedir is None:
-@@ -5190,6 +6626,8 @@ class YumBase(depsolve.Depsolve):
+@@ -5190,6 +6632,8 @@ class YumBase(depsolve.Depsolve):
self.prerepoconf.cachedir = cachedir
else:
self.repos.setCacheDir(cachedir)
@@ -190932,7 +190983,7 @@ index 99039e0..bbd20f3 100644
self.conf.cachedir = cachedir
return True # We got a new cache dir
-@@ -5220,13 +6658,24 @@ class YumBase(depsolve.Depsolve):
+@@ -5220,13 +6664,24 @@ class YumBase(depsolve.Depsolve):
self.history.write_addon_data('config-repos', myrepos)
def verify_plugins_cb(self, verify_package):
@@ -190960,7 +191011,7 @@ index 99039e0..bbd20f3 100644
if self.tsInfo._unresolvedMembers:
if auto:
self.logger.critical(_("Dependencies not solved. Will not save unresolved transaction."))
-@@ -5234,7 +6683,7 @@ class YumBase(depsolve.Depsolve):
+@@ -5234,7 +6689,7 @@ class YumBase(depsolve.Depsolve):
raise Errors.YumBaseError(_("Dependencies not solved. Will not save unresolved transaction."))
if not filename:
@@ -190969,7 +191020,7 @@ index 99039e0..bbd20f3 100644
fd,filename = tempfile.mkstemp(suffix='.yumtx', prefix=prefix)
f = os.fdopen(fd, 'w')
else:
-@@ -5244,13 +6693,17 @@ class YumBase(depsolve.Depsolve):
+@@ -5244,13 +6699,17 @@ class YumBase(depsolve.Depsolve):
msg = "%s\n" % self.rpmdb.simpleVersion(main_only=True)[0]
msg += "%s\n" % self.ts.getTsFlags()
@@ -190990,7 +191041,7 @@ index 99039e0..bbd20f3 100644
msg += "%s\n" % len(self.tsInfo.getMembers())
for txmbr in self.tsInfo.getMembers():
msg += txmbr._dump()
-@@ -5260,42 +6713,84 @@ class YumBase(depsolve.Depsolve):
+@@ -5260,42 +6719,84 @@ class YumBase(depsolve.Depsolve):
except (IOError, OSError), e:
self._ts_save_file = None
if auto:
@@ -191087,7 +191138,7 @@ index 99039e0..bbd20f3 100644
if ignorerpm:
msg += _(" ignoring, as requested.")
self.logger.critical(_(msg))
-@@ -5318,8 +6813,17 @@ class YumBase(depsolve.Depsolve):
+@@ -5318,8 +6819,17 @@ class YumBase(depsolve.Depsolve):
numrepos = int(data[2].strip())
repos = []
rindex=3+numrepos
@@ -191106,7 +191157,7 @@ index 99039e0..bbd20f3 100644
# pkgs/txmbrs
numpkgs = int(data[rindex].strip())
-@@ -5329,6 +6833,7 @@ class YumBase(depsolve.Depsolve):
+@@ -5329,6 +6839,7 @@ class YumBase(depsolve.Depsolve):
pkgcount = 0
pkgprob = False
curpkg = None
@@ -191114,7 +191165,7 @@ index 99039e0..bbd20f3 100644
for l in data[pkgstart:]:
l = l.rstrip()
# our main txmbrs
-@@ -5356,6 +6861,7 @@ class YumBase(depsolve.Depsolve):
+@@ -5356,6 +6867,7 @@ class YumBase(depsolve.Depsolve):
if not ignoremissing:
raise Errors.YumBaseError(msg)
else:
@@ -191122,7 +191173,7 @@ index 99039e0..bbd20f3 100644
self.logger.critical(msg)
else:
pkgcount += 1
-@@ -5432,12 +6938,18 @@ class YumBase(depsolve.Depsolve):
+@@ -5432,12 +6944,18 @@ class YumBase(depsolve.Depsolve):
if pkgprob:
msg = _("Transaction members, relations are missing or ts has been modified,")
if ignoremissing:
@@ -191141,7 +191192,7 @@ index 99039e0..bbd20f3 100644
return self.tsInfo.getMembers()
def _remove_old_deps(self):
-@@ -5470,18 +6982,6 @@ class YumBase(depsolve.Depsolve):
+@@ -5470,18 +6988,6 @@ class YumBase(depsolve.Depsolve):
if requiring == required: # if they are self-requiring skip them
continue
@@ -191160,7 +191211,7 @@ index 99039e0..bbd20f3 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 +7033,24 @@ class YumBase(depsolve.Depsolve):
+@@ -5533,7 +7039,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
@@ -191185,7 +191236,7 @@ index 99039e0..bbd20f3 100644
visited[curpkg] = True
all_leaves_visited = True
leaves = curpkg.requiring_packages()
-@@ -5547,4 +7064,3 @@ class YumBase(depsolve.Depsolve):
+@@ -5547,4 +7070,3 @@ class YumBase(depsolve.Depsolve):
# Debugging output
self.verbose_logger.log(logginglevels.DEBUG_2, _("%s has no user-installed revdeps."), pkg)
return False
diff --git a/yum.spec b/yum.spec
index a6d88f2..9867e8c 100644
--- a/yum.spec
+++ b/yum.spec
@@ -11,6 +11,10 @@
%if 0%{?rhel} <= 6
# rhel-6 doesn't have the systemd stuff...
%define yum_cron_systemd 0
+%endif
+
+%if 0%{?rhel} <= 7
+# rhel-7 doesn't use systemd timers...
%define yum_makecache_systemd 0
%endif
@@ -60,7 +64,7 @@ BuildRequires: bash-completion
Summary: RPM package installer/updater/manager
Name: yum
Version: 3.4.3
-Release: 133%{?dist}
+Release: 134%{?dist}
License: GPLv2+
Group: System Environment/Base
Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz
@@ -501,6 +505,15 @@ exit 0
%endif
%changelog
+* Wed Jan 29 2014 James Antill <james at fedoraproject.org> - 3.4.3-134
+- update to latest HEAD
+- Add yum-cron to run_with_package_names.
+- Don't create lockdir directories, as they are magic now. BZ 975864.
+- Make 'yum install @group' give an error when trying to install a
+- non-existent group.
+- One more s/ouput/output/ fix
+- Cleanup spec for rhel-7 builds.
+
* Thu Jan 23 2014 James Antill <james at fedoraproject.org> - 3.4.3-133
- update to latest HEAD
- Test for lvm binary before using. BZ 1047793.
More information about the scm-commits
mailing list