[yum] update to latest HEAD.
James Antill
james at fedoraproject.org
Wed May 1 04:04:20 UTC 2013
commit 6af3e604670d483b4c1d48f76968a2153825aeaa
Author: James Antill <james at and.org>
Date: Wed May 1 00:04:01 2013 -0400
update to latest HEAD.
- Allow default on Environment optional groups.
- Tweak load-ts output.
yum-HEAD.patch | 278 +++++++++++++++++++++++++++++++++++--------------------
yum.spec | 7 +-
2 files changed, 183 insertions(+), 102 deletions(-)
---
diff --git a/yum-HEAD.patch b/yum-HEAD.patch
index 923f4d4..306c178 100644
--- a/yum-HEAD.patch
+++ b/yum-HEAD.patch
@@ -99,7 +99,7 @@ index 2f6154e..2e5a052 100644
diff --git a/cli.py b/cli.py
old mode 100644
new mode 100755
-index 6056d38..e652a2f
+index 6056d38..173568f
--- a/cli.py
+++ b/cli.py
@@ -25,7 +25,7 @@ import sys
@@ -498,7 +498,7 @@ index 6056d38..e652a2f
if msgs:
rpmlib_only = True
for msg in msgs:
-@@ -532,19 +644,23 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -532,21 +644,23 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
print _("ERROR You need to update rpm to handle:")
else:
print _('ERROR with transaction check vs depsolve:')
@@ -521,11 +521,13 @@ index 6056d38..e652a2f
tt_st = time.time()
self.verbose_logger.log(yum.logginglevels.INFO_2,
- _('Running Transaction Test'))
+- if not self.conf.diskspacecheck:
+- self.tsInfo.probFilterFlags.append(rpm.RPMPROB_FILTER_DISKSPACE)
+ _('Running transaction test'))
- if not self.conf.diskspacecheck:
- self.tsInfo.probFilterFlags.append(rpm.RPMPROB_FILTER_DISKSPACE)
-@@ -556,16 +672,16 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+ self.ts.order() # order the transaction
+ self.ts.clean() # release memory not needed beyond this point
+@@ -556,16 +670,16 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
del testcb
if len(tserrors) > 0:
@@ -545,7 +547,7 @@ index 6056d38..e652a2f
# unset the sigquit handler
signal.signal(signal.SIGQUIT, signal.SIG_DFL)
-@@ -595,7 +711,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -595,7 +709,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
if self.conf.debuglevel < 2:
cb.display.output = False
@@ -554,7 +556,7 @@ index 6056d38..e652a2f
resultobject = self.runTransaction(cb=cb)
self.verbose_logger.debug('Transaction time: %0.3f' % (time.time() - ts_st))
-@@ -609,12 +725,14 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -609,12 +723,14 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return resultobject.return_code
def gpgsigcheck(self, pkgs):
@@ -574,7 +576,7 @@ index 6056d38..e652a2f
for po in pkgs:
result, errmsg = self.sigCheckPkg(po)
-@@ -623,7 +741,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -623,7 +739,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
continue
elif result == 1:
@@ -584,7 +586,7 @@ index 6056d38..e652a2f
raise yum.Errors.YumBaseError, \
_('Refusing to automatically import keys when running ' \
'unattended.\nUse "-y" to override.')
-@@ -691,12 +810,62 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -691,12 +808,62 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
", ".join(matches))
self.verbose_logger.log(yum.logginglevels.INFO_2, msg)
@@ -653,7 +655,7 @@ index 6056d38..e652a2f
# get the list of available packages
# iterate over the user's list
# add packages to Transaction holding class if they match.
-@@ -710,11 +879,36 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -710,11 +877,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))):
@@ -692,7 +694,7 @@ index 6056d38..e652a2f
except yum.Errors.InstallError:
self.verbose_logger.log(yum.logginglevels.INFO_2,
_('No package %s%s%s available.'),
-@@ -723,6 +917,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -723,6 +915,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self._maybeYouMeant(arg)
else:
done = True
@@ -700,7 +702,7 @@ index 6056d38..e652a2f
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 +927,27 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -732,9 +925,27 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return 0, [_('Nothing to do')]
def updatePkgs(self, userlist, quiet=0, update_to=False):
@@ -731,7 +733,7 @@ index 6056d38..e652a2f
# 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 +958,46 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -745,34 +956,46 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
else:
# go through the userlist - look for items that are local rpms. If we find them
@@ -795,7 +797,7 @@ index 6056d38..e652a2f
level = 'diff'
if userlist and userlist[0] in ('full', 'diff', 'different'):
-@@ -831,6 +1056,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -831,6 +1054,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
continue
nayi = napkg.yumdb_info
@@ -803,7 +805,7 @@ index 6056d38..e652a2f
for apkg in self.pkgSack.searchPkgTuple(napkg.pkgtup):
if ('checksum_type' in nayi and
'checksum_data' in nayi and
-@@ -861,19 +1087,58 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -861,19 +1085,58 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
dupdates.extend(self.downgrade(name=n, epoch=e, ver=v, rel=r))
if dupdates:
@@ -870,7 +872,7 @@ index 6056d38..e652a2f
if not rms:
self._checkMaybeYouMeant(arg, always_output=False, rpmdb_only=True)
all_rms.extend(rms)
-@@ -884,12 +1149,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -884,12 +1147,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return 0, [_('No Packages marked for removal')]
def downgradePkgs(self, userlist):
@@ -898,7 +900,7 @@ index 6056d38..e652a2f
for arg in userlist:
if (arg.endswith('.rpm') and (yum.misc.re_remote_url(arg) or
os.path.exists(arg))):
-@@ -905,26 +1182,44 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -905,26 +1180,44 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self.term.MODE['bold'], arg,
self.term.MODE['normal'])
self._maybeYouMeant(arg)
@@ -947,7 +949,7 @@ index 6056d38..e652a2f
except yum.Errors.ReinstallRemoveError:
self._checkMaybeYouMeant(arg, always_output=False)
except yum.Errors.ReinstallInstallError, e:
-@@ -940,22 +1235,38 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -940,22 +1233,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)
@@ -990,7 +992,7 @@ index 6056d38..e652a2f
installing = False
for pkg in filelist:
-@@ -971,23 +1282,29 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -971,23 +1280,29 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return 2, [_('Package(s) to install')]
return 0, [_('Nothing to do')]
@@ -1036,7 +1038,7 @@ index 6056d38..e652a2f
pkgnarrow = 'all'
done_hidden_available = False
-@@ -1003,7 +1320,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1003,7 +1318,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
pkgnarrow = extcmds.pop(0)
ypl = self.doPackageLists(pkgnarrow=pkgnarrow, patterns=extcmds,
@@ -1045,7 +1047,7 @@ index 6056d38..e652a2f
if self.conf.showdupesfromrepos:
ypl.available += ypl.reinstall_available
-@@ -1017,8 +1334,25 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1017,8 +1332,25 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return ypl
def search(self, args):
@@ -1073,7 +1075,7 @@ index 6056d38..e652a2f
# call the yum module search function with lists of tags to search
# and what to search for
-@@ -1053,7 +1387,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1053,7 +1385,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
print ""
else:
mkeys = set(keys)
@@ -1082,7 +1084,7 @@ index 6056d38..e652a2f
okeys = keys
pos.add(po)
akeys.update(keys)
-@@ -1104,13 +1438,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1104,13 +1436,24 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self.logger.warning(_('Warning: No matches found for: %s'), arg)
if not akeys:
@@ -1110,7 +1112,7 @@ index 6056d38..e652a2f
pkgs = []
for arg in args:
if (arg.endswith('.rpm') and (yum.misc.re_remote_url(arg) or
-@@ -1118,10 +1463,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1118,10 +1461,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
thispkg = yum.packages.YumUrlPackage(self, self.ts, arg)
pkgs.append(thispkg)
elif self.conf.showdupesfromrepos:
@@ -1125,7 +1127,7 @@ index 6056d38..e652a2f
except yum.Errors.PackageSackError:
pass
-@@ -1131,10 +1478,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1131,10 +1476,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return 0, []
def provides(self, args):
@@ -1149,7 +1151,7 @@ index 6056d38..e652a2f
old_sdup = self.conf.showdupesfromrepos
# For output, as searchPackageProvides() is always in showdups mode
self.conf.showdupesfromrepos = True
-@@ -1147,6 +1503,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1147,6 +1501,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
paths = set(sys.path + os.environ['PATH'].split(':'))
nargs = []
for arg in args:
@@ -1158,7 +1160,7 @@ index 6056d38..e652a2f
if yum.misc.re_filename(arg) or yum.misc.re_glob(arg):
continue
for path in paths:
-@@ -1158,25 +1516,82 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1158,25 +1514,82 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self.conf.showdupesfromrepos = old_sdup
if len(matching) == 0:
@@ -1247,7 +1249,7 @@ index 6056d38..e652a2f
hdrcode = pkgcode = xmlcode = dbcode = expccode = 0
pkgresults = hdrresults = xmlresults = dbresults = expcresults = []
msg = self.fmtKeyValFill(_('Cleaning repos: '),
-@@ -1184,7 +1599,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1184,7 +1597,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,
@@ -1256,7 +1258,7 @@ index 6056d38..e652a2f
pkgcode, pkgresults = self.cleanPackages()
hdrcode, hdrresults = self.cleanHeaders()
xmlcode, xmlresults = self.cleanMetadata()
-@@ -1200,10 +1615,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1200,10 +1613,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return code, []
if 'headers' in userlist:
@@ -1269,7 +1271,7 @@ index 6056d38..e652a2f
pkgcode, pkgresults = self.cleanPackages()
if 'metadata' in userlist:
self.logger.debug(_('Cleaning up xml metadata'))
-@@ -1228,138 +1643,265 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1228,138 +1641,265 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return code, []
def returnGroupLists(self, userlist):
@@ -1617,7 +1619,7 @@ index 6056d38..e652a2f
continue
if not pkgs_used:
-@@ -1368,17 +1910,61 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1368,17 +1908,61 @@ 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):
@@ -1687,7 +1689,7 @@ index 6056d38..e652a2f
if not pkgs_used:
return 0, [_('No packages to remove from groups')]
-@@ -1389,7 +1975,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1389,7 +1973,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
def _promptWanted(self):
# shortcut for the always-off/always-on options
@@ -1696,7 +1698,7 @@ index 6056d38..e652a2f
return False
if self.conf.alwaysprompt:
return True
-@@ -1397,10 +1983,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1397,10 +1981,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
# prompt if:
# package was added to fill a dependency
# package is being removed
@@ -1708,7 +1710,7 @@ index 6056d38..e652a2f
txmbr.name not in self.extcmds:
return True
-@@ -1408,11 +1993,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1408,11 +1991,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return False
def usage(self):
@@ -1722,7 +1724,7 @@ index 6056d38..e652a2f
sys.stdout.write(self.optparser.get_usage())
def _installable(self, pkg, ematch=False):
-@@ -1468,9 +2053,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -1468,9 +2051,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return False
class YumOptionParser(OptionParser):
@@ -1734,7 +1736,7 @@ index 6056d38..e652a2f
def __init__(self,base, **kwargs):
# check if this is called with a utils=True/False parameter
-@@ -1488,13 +2073,23 @@ class YumOptionParser(OptionParser):
+@@ -1488,13 +2071,23 @@ class YumOptionParser(OptionParser):
self._addYumBasicOptions()
def error(self, msg):
@@ -1760,7 +1762,7 @@ index 6056d38..e652a2f
try:
args = _filtercmdline(
('--noplugins','--version','-q', '-v', "--quiet", "--verbose"),
-@@ -1521,7 +2116,15 @@ class YumOptionParser(OptionParser):
+@@ -1521,7 +2114,15 @@ class YumOptionParser(OptionParser):
return ret
def setupYumConfig(self, args=None):
@@ -1777,7 +1779,7 @@ index 6056d38..e652a2f
if not args:
(opts, cmds) = self.parse_args()
else:
-@@ -1533,16 +2136,30 @@ class YumOptionParser(OptionParser):
+@@ -1533,16 +2134,30 @@ class YumOptionParser(OptionParser):
try:
# config file is parsed and moving us forward
# set some things in it.
@@ -1814,7 +1816,7 @@ index 6056d38..e652a2f
self.base.conf.cache = 1
if opts.obsoletes:
-@@ -1610,10 +2227,6 @@ class YumOptionParser(OptionParser):
+@@ -1610,10 +2225,6 @@ class YumOptionParser(OptionParser):
self.base.usage()
sys.exit(1)
@@ -1825,7 +1827,7 @@ index 6056d38..e652a2f
# Disable all gpg key checking, if requested.
if opts.nogpgcheck:
# Altering the normal configs. doesn't work too well, esp. with
-@@ -1623,7 +2236,7 @@ class YumOptionParser(OptionParser):
+@@ -1623,7 +2234,7 @@ class YumOptionParser(OptionParser):
repo._override_sigchecks = True
except ValueError, e:
@@ -1834,7 +1836,7 @@ index 6056d38..e652a2f
self.base.usage()
sys.exit(1)
-@@ -1640,10 +2253,18 @@ class YumOptionParser(OptionParser):
+@@ -1640,10 +2251,18 @@ class YumOptionParser(OptionParser):
sys.exit(1)
def getRoot(self,opts):
@@ -1854,7 +1856,7 @@ index 6056d38..e652a2f
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 +2322,9 @@ class YumOptionParser(OptionParser):
+@@ -1701,6 +2320,9 @@ class YumOptionParser(OptionParser):
group.add_option("--showduplicates", dest="showdupesfromrepos",
action="store_true",
help=_("show duplicates, in repos, in list/search commands"))
@@ -1864,7 +1866,7 @@ index 6056d38..e652a2f
group.add_option("-e", "--errorlevel", dest="errorlevel", default=None,
help=_("error output level"), type='int',
metavar='[error level]')
-@@ -1713,6 +2337,10 @@ class YumOptionParser(OptionParser):
+@@ -1713,6 +2335,10 @@ class YumOptionParser(OptionParser):
help=_("verbose operation"))
group.add_option("-y", "--assumeyes", dest="assumeyes",
action="store_true", help=_("answer yes for all questions"))
@@ -1875,7 +1877,7 @@ index 6056d38..e652a2f
group.add_option("--version", action="store_true",
help=_("show Yum version and exit"))
group.add_option("--installroot", help=_("set install root"),
-@@ -1748,9 +2376,29 @@ class YumOptionParser(OptionParser):
+@@ -1748,9 +2374,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"))
@@ -2670,7 +2672,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..2980c07 100644
+index 1a8202a..8c156f0 100644
--- a/docs/yum.8
+++ b/docs/yum.8
@@ -25,6 +25,8 @@ gnome\-packagekit application\&.
@@ -3066,7 +3068,7 @@ index 1a8202a..2980c07 100644
+Running the command without an argument, or a directory as an argument will
+try and list the possible files available to load. Showing if the packages are
+still available, if the rpmdb matches the current rpmdb, how many transaction
-+members are in the saved transaction and what the filename is.
++install/removes members are in the saved transaction and what the filename is.
+
+.IP
+.IP "\fBupdateinfo\fP"
@@ -3248,7 +3250,7 @@ index 1a8202a..2980c07 100644
List the packages installed on the system that are obsoleted by packages
in any yum repository listed in the config file.
diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
-index 515aa73..15aaa06 100644
+index 515aa73..66129bd 100644
--- a/docs/yum.conf.5
+++ b/docs/yum.conf.5
@@ -114,15 +114,27 @@ are causing problems from the transaction.
@@ -3371,7 +3373,17 @@ index 515aa73..15aaa06 100644
\fBinstallroot \fR
Specifies an alternative installroot, relative to which all packages will be
installed.
-@@ -300,6 +363,40 @@ with the \fBthrottle\fR option (above). If \fBthrottle\fR is a percentage and
+@@ -230,7 +293,8 @@ provides this manually by using: "yum whatprovides redhat-release".
+ .IP
+ \fBdiskspacecheck\fR
+ Either `0' or `1'. Set this to `0' to disable the checking for sufficient
+-diskspace before a RPM transaction is run. Default is `1' (perform the check).
++diskspace and inodes before a RPM transaction is run. Default is `1'
++(perform the check).
+
+ .IP
+ \fBtsflags\fR
+@@ -300,6 +364,40 @@ with the \fBthrottle\fR option (above). If \fBthrottle\fR is a percentage and
ignored. Default is `0' (no bandwidth throttling).
.IP
@@ -3412,7 +3424,7 @@ index 515aa73..15aaa06 100644
\fBsslcacert \fR
Path to the directory containing the databases of the certificate authorities
yum should use to verify SSL certificates. Defaults to none - uses system
-@@ -331,6 +428,15 @@ Path to the SSL client key yum should use to connect to repos/remote sites
+@@ -331,6 +429,15 @@ Path to the SSL client key yum should use to connect to repos/remote sites
Defaults to none.
.IP
@@ -3428,7 +3440,7 @@ index 515aa73..15aaa06 100644
\fBhistory_record \fR
Boolean - should yum record history entries for transactions. This takes some
disk space, and some extra time in the transactions. But it allows how to know a
-@@ -438,6 +544,31 @@ It's also possible to use the word "never", meaning that the metadata will
+@@ -438,6 +545,31 @@ It's also possible to use the word "never", meaning that the metadata will
never expire. Note that when using a metalink file the metalink must always
be newer than the metadata for the repository, due to the validation, so this
timeout also applies to the metalink file.
@@ -3460,7 +3472,7 @@ index 515aa73..15aaa06 100644
.IP
\fBmirrorlist_expire \fR
-@@ -480,6 +611,19 @@ not listed above is the other metadata, which contains the changelog information
+@@ -480,6 +612,19 @@ not listed above is the other metadata, which contains the changelog information
which is used by yum-changelog. This is what "yum makecache" uses.
.IP
@@ -3480,7 +3492,7 @@ index 515aa73..15aaa06 100644
\fBmultilib_policy \fR
Can be set to 'all' or 'best'. All means install all possible arches for any package you
want to install. Therefore yum install foo will install foo.i386 and foo.x86_64 on x86_64,
-@@ -587,14 +731,65 @@ be downloaded. The updates list is what is printed when you run "yum update",
+@@ -587,14 +732,65 @@ be downloaded. The updates list is what is printed when you run "yum update",
Default is `normal'.
See color_list_installed_older for possible values.
@@ -3546,7 +3558,7 @@ index 515aa73..15aaa06 100644
.SH "[repository] OPTIONS"
-@@ -702,12 +897,18 @@ key will be automatically imported without user confirmation.
+@@ -702,12 +898,18 @@ key will be automatically imported without user confirmation.
Same as the [main] \fBexclude\fR option but only for this repository.
Substitution variables, described below, are honored here.
@@ -3569,7 +3581,7 @@ index 515aa73..15aaa06 100644
.IP
\fBenablegroups\fR
-@@ -755,6 +956,16 @@ repository.
+@@ -755,6 +957,16 @@ repository.
Overrides the \fBbandwidth\fR option from the [main] section for this
repository.
@@ -3586,7 +3598,7 @@ index 515aa73..15aaa06 100644
.IP
\fBsslcacert \fR
-@@ -776,6 +987,10 @@ repository.
+@@ -776,6 +988,10 @@ repository.
Overrides the \fBsslclientkey\fR option from the [main] section for this
repository.
@@ -3597,7 +3609,7 @@ index 515aa73..15aaa06 100644
.IP
\fBmetadata_expire \fR
-@@ -783,6 +998,11 @@ Overrides the \fBmetadata_expire\fR option from the [main] section for this
+@@ -783,6 +999,11 @@ Overrides the \fBmetadata_expire\fR option from the [main] section for this
repository.
.IP
@@ -3609,7 +3621,7 @@ index 515aa73..15aaa06 100644
\fBmirrorlist_expire \fR
Overrides the \fBmirrorlist_expire\fR option from the [main] section for this
repository.
-@@ -824,7 +1044,16 @@ as greater/less than any other. defaults to 1000
+@@ -824,7 +1045,16 @@ as greater/less than any other. defaults to 1000
If set to True yum will continue running if this repository cannot be
contacted for any reason. This should be set carefully as all repos are consulted
for any given command. Defaults to False.
@@ -182213,6 +182225,20 @@ index 6082005..57cbdfc 100644
self.basearch = getBaseArch(myarch=self.canonarch)
self.archlist = getArchList(thisarch=self.canonarch)
+diff --git a/rpmUtils/transaction.py b/rpmUtils/transaction.py
+index 121ad5b..778ed2d 100644
+--- a/rpmUtils/transaction.py
++++ b/rpmUtils/transaction.py
+@@ -114,7 +114,8 @@ class TransactionWrapper:
+ # FIXME GARBAGE - remove once this is reimplemented elsehwere
+ # KEEPING FOR API COMPLIANCE ONLY
+ if conf.get('diskspacecheck') == 0:
+- self.ts.setProbFilter(rpm.RPMPROB_FILTER_DISKSPACE)
++ self.ts.setProbFilter(rpm.RPMPROB_FILTER_DISKSPACE|
++ rpm.RPMPROB_FILTER_DISKNODES)
+ tserrors = self.ts.run(cb.callback, '')
+ self.ts.setFlags(origflags)
+
diff --git a/shell.py b/shell.py
index 999bffc..2232b03 100644
--- a/shell.py
@@ -190351,7 +190377,7 @@ index 7ad25ce..a9a8e53 100644
pass
diff --git a/yum/comps.py b/yum/comps.py
-index 65f6d5e..fe5649d 100755
+index 65f6d5e..d2deb4a 100755
--- a/yum/comps.py
+++ b/yum/comps.py
@@ -16,14 +16,14 @@
@@ -190398,7 +190424,7 @@ index 65f6d5e..fe5649d 100755
self.groupid = None
self.display_order = 1024
self.installed = False
-@@ -271,6 +281,136 @@ class Group(CompsObj):
+@@ -271,6 +281,152 @@ class Group(CompsObj):
return msg
@@ -190416,6 +190442,7 @@ index 65f6d5e..fe5649d 100755
+ self.installed = False
+ self._groups = {}
+ self._options = {}
++ self._defaultoptions = {}
+
+ if elem:
+ self.parse(elem)
@@ -190437,6 +190464,11 @@ index 65f6d5e..fe5649d 100755
+
+ options = property(_optioniter)
+
++ def _defaultoptioniter(self):
++ return self._defaultoptions.keys()
++
++ defaultoptions = property(_defaultoptioniter)
++
+ def parse(self, elem):
+ for child in elem:
+ if child.tag == 'id':
@@ -190487,6 +190519,10 @@ index 65f6d5e..fe5649d 100755
+ if child.tag == 'groupid':
+ optionid = child.text
+ self._options[optionid] = 1
++ defopt = child.attrib.get('default')
++ default = parse_boolean(defopt)
++ if default:
++ self._defaultoptions[optionid] = 1
+
+ def add(self, obj):
+ """Add another category object to this object"""
@@ -190494,6 +190530,9 @@ index 65f6d5e..fe5649d 100755
+ for grp in obj.groups:
+ self._groups[grp] = 1
+
++ for grp in obj.defaultoptions:
++ self._defaultoptions[grp] = 1
++
+ for grp in obj.options:
+ self._options[grp] = 1
+
@@ -190527,7 +190566,10 @@ index 65f6d5e..fe5649d 100755
+ msg += """ </grouplist>\n"""
+ msg += """ <optionlist>\n"""
+ for grp in self.options:
-+ msg += """ <groupid>%s</groupid>\n""" % grp
++ if grp in self.defaultoptions:
++ msg += """ <groupid default="true">%s</groupid>\n""" % grp
++ else:
++ msg += """ <groupid>%s</groupid>\n""" % grp
+ msg += """ </optionlist>\n"""
+ msg += """ </environment>\n"""
+
@@ -190535,7 +190577,7 @@ index 65f6d5e..fe5649d 100755
class Category(CompsObj):
""" Category object parsed from group data in each repo. and merged. """
-@@ -371,12 +511,61 @@ class Category(CompsObj):
+@@ -371,12 +527,61 @@ class Category(CompsObj):
msg += """ </category>\n"""
return msg
@@ -190598,7 +190640,7 @@ index 65f6d5e..fe5649d 100755
self.compscount = 0
self.overwrite_groups = overwrite_groups
self.compiled = False # have groups been compiled into avail/installed
-@@ -387,14 +576,24 @@ class Comps(object):
+@@ -387,14 +592,24 @@ class Comps(object):
grps = self._groups.values()
grps.sort(key=lambda x: (x.display_order, x.name))
return grps
@@ -190624,7 +190666,7 @@ index 65f6d5e..fe5649d 100755
def has_group(self, grpid):
exists = self.return_groups(grpid)
-@@ -447,6 +646,57 @@ class Comps(object):
+@@ -447,6 +662,57 @@ class Comps(object):
return returns.values()
@@ -190682,7 +190724,7 @@ index 65f6d5e..fe5649d 100755
# This is close to returnPackages() etc. API ... need to std. these names
# the above return_groups uses different, but equal, API.
def return_categories(self, pattern, ignore_case=True):
-@@ -490,6 +740,13 @@ class Comps(object):
+@@ -490,6 +756,13 @@ class Comps(object):
else:
self._groups[group.groupid] = group
@@ -190696,7 +190738,7 @@ index 65f6d5e..fe5649d 100755
def add_category(self, category):
if category.categoryid in self._categories:
thatcat = self._categories[category.categoryid]
-@@ -497,6 +754,9 @@ class Comps(object):
+@@ -497,6 +770,9 @@ class Comps(object):
else:
self._categories[category.categoryid] = category
@@ -190706,7 +190748,7 @@ index 65f6d5e..fe5649d 100755
def add(self, srcfile = None):
if not srcfile:
raise CompsException
-@@ -520,9 +780,14 @@ class Comps(object):
+@@ -520,9 +796,14 @@ class Comps(object):
if elem.tag == "group":
group = Group(elem)
self.add_group(group)
@@ -190721,7 +190763,7 @@ index 65f6d5e..fe5649d 100755
except SyntaxError, e:
raise CompsException, "comps file is empty/damaged"
-@@ -557,13 +822,32 @@ class Comps(object):
+@@ -557,13 +838,32 @@ class Comps(object):
if pkgname in inst_pkg_names:
group.installed = True
break
@@ -190755,7 +190797,7 @@ index 65f6d5e..fe5649d 100755
return ""
msg = """<?xml version="1.0" encoding="UTF-8"?>
-@@ -575,7 +859,9 @@ class Comps(object):
+@@ -575,7 +875,9 @@ class Comps(object):
msg += g.xml()
for c in self.get_categories():
msg += c.xml()
@@ -190766,7 +190808,7 @@ index 65f6d5e..fe5649d 100755
msg += """\n</comps>\n"""
return msg
-@@ -590,16 +876,34 @@ def main():
+@@ -590,16 +892,34 @@ def main():
for srcfile in sys.argv[1:]:
p.add(srcfile)
@@ -191865,7 +191907,7 @@ index d09511f..ec7ba80 100644
if name not in cfgOptions and option.default == value:
diff --git a/yum/depsolve.py b/yum/depsolve.py
-index 6d744c0..60047a9 100644
+index 6d744c0..52b751b 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -31,13 +31,15 @@ from transactioninfo import TransactionMember
@@ -191992,7 +192034,17 @@ index 6d744c0..60047a9 100644
self._ts = rpmUtils.transaction.TransactionWrapper(self.conf.installroot)
ts_flags_to_rpm = { 'noscripts': rpm.RPMTRANS_FLAG_NOSCRIPTS,
-@@ -158,19 +205,31 @@ class Depsolve(object):
+@@ -152,25 +199,41 @@ class Depsolve(object):
+ else:
+ self.logger.critical(_('Invalid tsflag in config file: %s'), flag)
+
++ if not self.conf.diskspacecheck:
++ self._add_prob_flags(rpm.RPMPROB_FILTER_DISKSPACE,
++ rpm.RPMPROB_FILTER_DISKNODES)
++
+ probfilter = 0
+ for flag in self.tsInfo.probFilterFlags:
+ probfilter |= flag
self._ts.setProbFilter(probfilter)
def whatProvides(self, name, flags, version):
@@ -192031,7 +192083,7 @@ index 6d744c0..60047a9 100644
iopkgs = set(self.conf.installonlypkgs)
if po.name in iopkgs:
return True
-@@ -182,8 +241,11 @@ class Depsolve(object):
+@@ -182,8 +245,11 @@ class Depsolve(object):
return False
def populateTs(self, test=0, keepold=1):
@@ -192044,7 +192096,7 @@ index 6d744c0..60047a9 100644
if self.dsCallback: self.dsCallback.transactionPopulation()
ts_elem = {}
-@@ -393,9 +455,27 @@ class Depsolve(object):
+@@ -393,9 +459,27 @@ class Depsolve(object):
self.conf.obsoletes = 0
txmbrs = self.update(po=requiringPo, requiringPo=requiringPo)
self.conf.obsoletes = origobs
@@ -192074,7 +192126,7 @@ index 6d744c0..60047a9 100644
msg = self._err_missing_requires(requiringPo, requirement)
self.verbose_logger.log(logginglevels.DEBUG_2, _('No update paths found for %s. Failure!'), requiringPo)
return self._requiringFromTransaction(requiringPo, requirement, errorlist)
-@@ -405,12 +485,30 @@ class Depsolve(object):
+@@ -405,12 +489,30 @@ class Depsolve(object):
# try to update the requiring package in hopes that all this problem goes away :(
self.verbose_logger.log(logginglevels.DEBUG_2, _('Trying to update %s to resolve dep'), requiringPo)
txmbrs = self.update(po=requiringPo, requiringPo=requiringPo)
@@ -192107,7 +192159,7 @@ index 6d744c0..60047a9 100644
if needmode in ['e']:
self.verbose_logger.log(logginglevels.DEBUG_2, _('TSINFO: %s package requiring %s marked as erase'),
-@@ -696,6 +794,13 @@ class Depsolve(object):
+@@ -696,6 +798,13 @@ class Depsolve(object):
self.tsInfo.remove(txmbr.pkgtup)
def prof_resolveDeps(self):
@@ -192121,7 +192173,7 @@ index 6d744c0..60047a9 100644
fn = "anaconda.prof.0"
import hotshot, hotshot.stats
prof = hotshot.Profile(fn)
-@@ -709,6 +814,13 @@ class Depsolve(object):
+@@ -709,6 +818,13 @@ class Depsolve(object):
return rc
def cprof_resolveDeps(self):
@@ -192135,7 +192187,7 @@ index 6d744c0..60047a9 100644
import cProfile, pstats
prof = cProfile.Profile()
rc = prof.runcall(self.resolveDeps)
-@@ -722,7 +834,17 @@ class Depsolve(object):
+@@ -722,7 +838,17 @@ class Depsolve(object):
return rc
def resolveDeps(self, full_check=True, skipping_broken=False):
@@ -192154,7 +192206,7 @@ index 6d744c0..60047a9 100644
if not len(self.tsInfo):
return (0, [_('Success - empty transaction')])
-@@ -778,6 +900,12 @@ class Depsolve(object):
+@@ -778,6 +904,12 @@ class Depsolve(object):
if checkdep:
break # The next conflict might be the same pkg
@@ -192167,7 +192219,7 @@ index 6d744c0..60047a9 100644
if CheckDeps:
if self.dsCallback: self.dsCallback.restartLoop()
self.verbose_logger.log(logginglevels.DEBUG_1, _('Restarting Loop'))
-@@ -920,9 +1048,12 @@ class Depsolve(object):
+@@ -920,9 +1052,12 @@ class Depsolve(object):
# if this is an update, we should check what the old
# requires were to make things faster
@@ -192182,7 +192234,7 @@ index 6d744c0..60047a9 100644
oldreqs = set(oldreqs)
ret = []
-@@ -948,7 +1079,7 @@ class Depsolve(object):
+@@ -948,7 +1083,7 @@ class Depsolve(object):
continue
for member in self.tsInfo.getMembersWithState(
pkgtup=po.pkgtup, output_states=TS_INSTALL_STATES):
@@ -192191,7 +192243,7 @@ index 6d744c0..60047a9 100644
return ret
-@@ -974,12 +1105,36 @@ class Depsolve(object):
+@@ -974,12 +1109,36 @@ class Depsolve(object):
# FIXME: This is probably the best place to fix the postfix rename
# problem long term (post .21) ... see compare_providers.
for pkg, hits in self.tsInfo.getRequires(*prov).iteritems():
@@ -192229,7 +192281,7 @@ index 6d744c0..60047a9 100644
# We don't undo anything else here ... hopefully that's
# fine.
self.tsInfo.remove(txmbr.pkgtup)
-@@ -1033,10 +1188,10 @@ class Depsolve(object):
+@@ -1033,10 +1192,10 @@ class Depsolve(object):
# get file requirements from new packages
for txmbr in self._tsInfo.getMembersWithState(output_states=TS_INSTALL_STATES):
@@ -192242,7 +192294,7 @@ index 6d744c0..60047a9 100644
# check if file requires was already unresolved in update
if name in self.installedUnresolvedFileRequires:
already_broken = False
-@@ -1050,6 +1205,7 @@ class Depsolve(object):
+@@ -1050,6 +1209,7 @@ class Depsolve(object):
nfileRequires.add(name)
fileRequires.add(name)
reverselookup.setdefault(name, []).append(txmbr.po.pkgtup)
@@ -192250,7 +192302,7 @@ index 6d744c0..60047a9 100644
todel = []
for fname in self.installedFileProviders:
-@@ -1149,7 +1305,76 @@ class Depsolve(object):
+@@ -1149,7 +1309,76 @@ class Depsolve(object):
self.rpmdb.transactionCacheConflictPackages(cpkgs)
return ret
@@ -192327,7 +192379,7 @@ index 6d744c0..60047a9 100644
lst = self.tsInfo.matchNaevr(name = pkgname)
for txmbr in lst:
if txmbr.output_state in TS_INSTALL_STATES:
-@@ -1166,7 +1391,7 @@ class Depsolve(object):
+@@ -1166,7 +1395,7 @@ class Depsolve(object):
return True
_isPackageInstalled = isPackageInstalled
@@ -192336,7 +192388,7 @@ index 6d744c0..60047a9 100644
"""take the list of pkgs and score them based on the requesting package
return a dictionary of po=score"""
self.verbose_logger.log(logginglevels.DEBUG_4,
-@@ -1210,6 +1435,24 @@ class Depsolve(object):
+@@ -1210,6 +1439,24 @@ class Depsolve(object):
return None
return x
@@ -192361,7 +192413,7 @@ index 6d744c0..60047a9 100644
# Actual start of _compare_providers().
# Do a NameArch filtering, based on repo. __cmp__
-@@ -1332,6 +1575,26 @@ class Depsolve(object):
+@@ -1332,6 +1579,26 @@ class Depsolve(object):
_('common prefix of %s between %s and %s' % (cpl, po, reqpo)))
pkgresults[po] += cpl*2
@@ -192388,7 +192440,7 @@ index 6d744c0..60047a9 100644
# If we have more than one "best", see what would happen if we picked
# each package ... ie. what things do they require that _aren't_ already
-@@ -1393,42 +1656,52 @@ class Depsolve(object):
+@@ -1393,42 +1660,52 @@ class Depsolve(object):
class DepCheck(object):
@@ -192457,7 +192509,7 @@ index 6d744c0..60047a9 100644
self.conflict = conflict # what the conflict was between them
diff --git a/yum/drpm.py b/yum/drpm.py
new file mode 100644
-index 0000000..ae5a764
+index 0000000..b04779d
--- /dev/null
+++ b/yum/drpm.py
@@ -0,0 +1,316 @@
@@ -192636,7 +192688,7 @@ index 0000000..ae5a764
+ kwargs['failfunc'] = failfunc
+ kwargs['async'] = True
+ try: mdpath[repo] = repo._retrieveMD(name, **kwargs)
-+ except Errors.RepoError, e: failfunc(e)
++ except RepoError, e: failfunc(e)
+ if async:
+ grabber.parallel_wait()
+
@@ -197787,7 +197839,7 @@ index e5e9ece..2e4fcd9 100644
fo = None
diff --git a/yumcommands.py b/yumcommands.py
-index 4dcbea7..e5f2363 100644
+index 4dcbea7..0407c92 100644
--- a/yumcommands.py
+++ b/yumcommands.py
@@ -13,6 +13,7 @@
@@ -200585,7 +200637,7 @@ index 4dcbea7..e5f2363 100644
chkcmd = 'all'
if extcmds:
chkcmd = extcmds
-@@ -1505,24 +3138,147 @@ class CheckRpmdbCommand(YumCommand):
+@@ -1505,24 +3138,171 @@ class CheckRpmdbCommand(YumCommand):
return rc, ['%s %s' % (basecmd, chkcmd)]
def needTs(self, base, basecmd, extcmds):
@@ -200670,6 +200722,14 @@ index 4dcbea7..e5f2363 100644
+ return False # Bad...
+
+ return True
++ def _pkg_counts(l, counts):
++ if not l.startswith(' ts_state: '):
++ return
++ state = l[len(' ts_state: '):]
++ if state in ('e', 'od', 'ud'):
++ counts['remove'] += 1
++ elif state in ('i', 'u'):
++ counts['install'] += 1
+
if not extcmds:
- base.logger.critical(_("No saved transaction file specified."))
@@ -200707,6 +200767,11 @@ index 4dcbea7..e5f2363 100644
+ except:
+ continue
+
++ counts = {'install' : 0, 'remove' : 0}
++ for l in data[pkgstart:]:
++ l = l.rstrip()
++ _pkg_counts(l, counts)
++
+ # Check to see if all the packages are available..
+ bad = ' '
+ for l in data[pkgstart:]:
@@ -200717,26 +200782,37 @@ index 4dcbea7..e5f2363 100644
+ bad = '*'
+ break
+
++ # assert (counts['install'] + counts['remove']) == numpkgs
+ current = '%s%s' % (bad, current)
+ if not done:
-+ pkgtitle = _("Members")
-+ pkglen = utf8_width(pkgtitle)
-+ if pkglen < 6:
-+ pkglen = 6
-+ pkgtitle = utf8_width_fill(pkgtitle, pkglen)
-+ print "?? |", pkgtitle, "|", _("Filename")
++ pkgititle = _("Install")
++ pkgilen = utf8_width(pkgititle)
++ if pkgilen < 6:
++ pkgilen = 6
++ pkgititle = utf8_width_fill(pkgititle, pkgilen)
++
++ pkgetitle = _("Remove")
++ pkgelen = utf8_width(pkgetitle)
++ if pkgelen < 6:
++ pkgelen = 6
++ pkgetitle = utf8_width_fill(pkgetitle, pkgelen)
++ print "?? |", pkgititle, "|", pkgetitle, "|", _("Filename")
+
+ done = True
+
-+ numpkgs = "%*s" % (pkglen, locale.format("%d", numpkgs, True))
-+ print current, '|', numpkgs, '|', os.path.basename(yumtx)
++ numipkgs = locale.format("%d", counts['install'], True)
++ numipkgs = "%*s" % (pkgilen, numipkgs)
++ numepkgs = locale.format("%d", counts['remove'], True)
++ numepkgs = "%*s" % (pkgelen, numepkgs)
++ print "%s | %s | %s | %s" % (current, numipkgs, numepkgs,
++ os.path.basename(yumtx))
+ return 0, [_('Saved transactions from %s; looked at %u files') %
+ (load_file, len(yumtxs))]
+
self.doneCommand(base, _("loading transaction from %s") % load_file)
try:
-@@ -1533,5 +3289,809 @@ class LoadTransactionCommand(YumCommand):
+@@ -1533,5 +3313,809 @@ class LoadTransactionCommand(YumCommand):
def needTs(self, base, basecmd, extcmds):
diff --git a/yum.spec b/yum.spec
index c7bb536..dce8e0a 100644
--- a/yum.spec
+++ b/yum.spec
@@ -41,7 +41,7 @@ BuildRequires: bash-completion
Summary: RPM package installer/updater/manager
Name: yum
Version: 3.4.3
-Release: 87%{?dist}
+Release: 88%{?dist}
License: GPLv2+
Group: System Environment/Base
Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz
@@ -402,6 +402,11 @@ exit 0
%endif
%changelog
+* Tue Apr 30 2013 James Antill <james at fedoraproject.org> - 3.4.3-88
+- update to latest HEAD.
+- Allow default on Environment optional groups.
+- Tweak load-ts output.
+
* Fri Apr 26 2013 James Antill <james at fedoraproject.org> - 3.4.3-87
- update to latest HEAD.
- Make --downloadonly skip userconfirm prompt.
More information about the scm-commits
mailing list