[yum] latest head
Seth Vidal
skvidal at fedoraproject.org
Fri Mar 25 15:07:27 UTC 2011
commit dadc81b0d18ef7285691210ac609861f686988b8
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Mar 25 11:07:13 2011 -0400
latest head
yum-HEAD.patch | 377 ++++++++++++++++++++++++++++++++++++++++++++++++++------
yum.spec | 5 +-
2 files changed, 340 insertions(+), 42 deletions(-)
---
diff --git a/yum-HEAD.patch b/yum-HEAD.patch
index a079b82..f5447bf 100644
--- a/yum-HEAD.patch
+++ b/yum-HEAD.patch
@@ -1,8 +1,20 @@
diff --git a/cli.py b/cli.py
-index 640f190..a4c7c79 100644
+index 640f190..2267b86 100644
--- a/cli.py
+++ b/cli.py
-@@ -73,6 +73,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -45,6 +45,11 @@ import yumcommands
+
+ from yum.i18n import to_unicode, to_utf8
+
++# This is for yum-utils/yumdownloader in RHEL-5, where it isn't importing this
++# directly but did do "from cli import *", and we did have this in 3.2.22. I
++# just _love_ how python re-exports these by default.
++from yum.packages import parsePackages
++
+ def sigquit(signum, frame):
+ """ SIGQUIT handler for the yum cli. """
+ print >> sys.stderr, "Quit signal sent - exiting immediately"
+@@ -73,6 +78,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self.logger = logging.getLogger("yum.cli")
self.verbose_logger = logging.getLogger("yum.verbose.cli")
self.yum_cli_commands = {}
@@ -10,7 +22,7 @@ index 640f190..a4c7c79 100644
self.registerCommand(yumcommands.InstallCommand())
self.registerCommand(yumcommands.UpdateCommand())
self.registerCommand(yumcommands.InfoCommand())
-@@ -504,30 +505,35 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -504,30 +510,35 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
if self.gpgsigcheck(downloadpkgs) != 0:
return 1
@@ -67,7 +79,7 @@ index 640f190..a4c7c79 100644
tt_st = time.time()
self.verbose_logger.log(yum.logginglevels.INFO_2,
-@@ -535,14 +541,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -535,14 +546,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
if not self.conf.diskspacecheck:
self.tsInfo.probFilterFlags.append(rpm.RPMPROB_FILTER_DISKSPACE)
@@ -84,7 +96,7 @@ index 640f190..a4c7c79 100644
tserrors = self.ts.test(testcb)
del testcb
-@@ -555,7 +557,6 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -555,7 +562,6 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self.errorSummary(errstring)
self.verbose_logger.log(yum.logginglevels.INFO_2,
_('Transaction Test Succeeded'))
@@ -92,7 +104,7 @@ index 640f190..a4c7c79 100644
self.verbose_logger.debug('Transaction Test time: %0.3f' % (time.time() - tt_st))
-@@ -563,10 +564,6 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -563,10 +569,6 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
signal.signal(signal.SIGQUIT, signal.SIG_DFL)
ts_st = time.time()
@@ -103,7 +115,7 @@ index 640f190..a4c7c79 100644
# put back our depcheck callback
self.dsCallback = dscb
-@@ -629,7 +626,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -629,7 +631,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
", ".join(matches))
self.verbose_logger.log(yum.logginglevels.INFO_2, to_unicode(msg))
@@ -112,7 +124,7 @@ index 640f190..a4c7c79 100644
""" If the update/remove argument doesn't match with case, or due
to not being installed, tell the user. """
# always_output is a wart due to update/remove not producing the
-@@ -638,7 +635,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -638,7 +640,12 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
# skip it.
if not arg or arg[0] == '@':
return
@@ -126,7 +138,7 @@ index 640f190..a4c7c79 100644
if (matches.installed or (not matches.available and
self.returnInstalledPackagesByDep(arg))):
return # Found a match so ignore
-@@ -651,7 +653,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -651,7 +658,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
return
# No package name, so do the maybeYouMeant thing here too
@@ -135,7 +147,7 @@ index 640f190..a4c7c79 100644
if not matches.installed and matches.available:
self.verbose_logger.log(yum.logginglevels.INFO_2,
_('Package(s) %s%s%s available, but not installed.'),
-@@ -822,7 +824,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+@@ -822,7 +829,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
for arg in userlist:
rms = self.remove(pattern=arg)
if not rms:
@@ -144,8 +156,30 @@ index 640f190..a4c7c79 100644
all_rms.extend(rms)
if all_rms:
+@@ -1063,13 +1070,16 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
+ os.path.exists(arg))):
+ thispkg = yum.packages.YumUrlPackage(self, self.ts, arg)
+ pkgs.append(thispkg)
++ elif self.conf.showdupesfromrepos:
++ pkgs.extend(self.pkgSack.returnPackages(patterns=[arg]))
+ else:
+- ematch, match, unmatch = self.pkgSack.matchPackageNames([arg])
+- for po in ematch + match:
+- pkgs.append(po)
++ try:
++ pkgs.extend(self.pkgSack.returnNewestByName(patterns=[arg]))
++ except yum.Errors.PackageSackError:
++ pass
+
+- results = self.findDeps(pkgs)
+- self.depListOutput(results)
++ results = self.findDeps(pkgs)
++ self.depListOutput(results)
+
+ return 0, []
+
diff --git a/docs/yum.8 b/docs/yum.8
-index 52f6b53..3b414e2 100644
+index 52f6b53..360a976 100644
--- a/docs/yum.8
+++ b/docs/yum.8
@@ -73,7 +73,7 @@ gnome\-packagekit application\&.
@@ -157,7 +191,19 @@ index 52f6b53..3b414e2 100644
.br
.I \fR * check
.br
-@@ -316,8 +316,12 @@ The undo/redo commands take either a transaction id or the keyword last and
+@@ -253,7 +253,10 @@ on groups, files, provides, filelists and rpm files just like the "install" comm
+ .IP
+ .IP "\fBdeplist\fP"
+ Produces a list of all dependencies and what packages provide those
+-dependencies for the given packages.
++dependencies for the given packages. As of 3.2.30 it now just shows the latest
++version of each package that matches (this can be changed by
++using --showduplicates) and it only shows the newest providers (which can be
++changed by using --verbose).
+ .IP
+ .IP "\fBrepolist\fP"
+ Produces a list of configured repositories. The default is to list all
+@@ -316,8 +319,12 @@ The undo/redo commands take either a transaction id or the keyword last and
an offset from the last transaction (Eg. if you've done 250 transactions,
"last" refers to transaction 250, and "last-4" refers to transaction 246).
@@ -171,6 +217,34 @@ index 52f6b53..3b414e2 100644
.I \fB>\fR - The rpmdb was changed, outside yum, after the transaction.
.br
+@@ -402,7 +409,11 @@ Doesn't limit packages to their latest versions in the info, list and search
+ commands (will also affect plugins which use the doPackageLists() API).
+ .IP "\fB\-\-installroot=root\fP"
+ Specifies an alternative installroot, relative to which all packages will be
+-installed.
++installed. Think of this like doing "chroot <root> yum" except using
++\-\-installroot allows yum to work before the chroot is created.
++Note: You may also want to use the option \-\-releasever=/ when creating the
++installroot as otherwise the $releasever value is taken from the rpmdb within
++the installroot (and thus. will be empty, before creation).
+ .br
+ Configuration Option: \fBinstallroot\fP
+ .IP "\fB\-\-enablerepo=repoidglob\fP"
+@@ -458,9 +469,11 @@ Configuration Option: \fBskip_broken\fP
+ .br
+ .IP "\fB\-\-releasever=version\fP"
+ Pretend the current release version is the given string. This is very useful
+-when combined with \-\-installroot. Note that with the default upstream cachedir,
+-of /var/cache/yum, using this option will corrupt your cache (and you can use
+-$releasever in your cachedir configuration to stop this).
++when combined with \-\-installroot. You can also use \-\-releasever=/ to take
++the releasever information from outside the installroot.
++Note that with the default upstream cachedir, of /var/cache/yum, using this
++option will corrupt your cache (and you can use $releasever in your cachedir
++configuration to stop this).
+ .PP
+ .IP "\fB\-t, \-\-tolerant\fP"
+ This option currently does nothing.
diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
index e1c3480..a535b79 100644
--- a/docs/yum.conf.5
@@ -231,10 +305,40 @@ index f4be628..1ccb83d 100644
2>/dev/null | \
sed -ne 's/^[[:space:]]*\([0-9]\{1,\}\).*/\1/p' )" \
diff --git a/output.py b/output.py
-index b1d92e5..08fe0e3 100755
+index b1d92e5..85b21f8 100755
--- a/output.py
+++ b/output.py
-@@ -1619,6 +1619,18 @@ to exit.
+@@ -809,20 +809,26 @@ class YumOutput:
+ def depListOutput(self, results):
+ """take a list of findDeps results and 'pretty print' the output"""
+
+- for pkg in results:
++ verb = self.verbose_logger.isEnabledFor(logginglevels.DEBUG_3)
++ for pkg in sorted(results):
+ print _("package: %s") % pkg.compactPrint()
+ if len(results[pkg]) == 0:
+ print _(" No dependencies for this package")
+ continue
+
+- for req in results[pkg]:
++ for req in sorted(results[pkg]):
+ reqlist = results[pkg][req]
+ print _(" dependency: %s") % prco_tuple_to_string(req)
+ if not reqlist:
+ print _(" Unsatisfied dependency")
+ continue
+
+- for po in reqlist:
++ seen = {}
++ for po in reversed(sorted(reqlist)):
++ key = (po.name, po.arch)
++ if not verb and key in seen:
++ continue
++ seen[key] = po
+ print " provider: %s" % po.compactPrint()
+
+ def format_number(self, number, SI=0, space=' '):
+@@ -1619,6 +1625,18 @@ to exit.
self._historyInfoCmd(mobj)
@@ -253,7 +357,7 @@ index b1d92e5..08fe0e3 100755
def _historyInfoCmd(self, old, pats=[]):
name = self._pwd_ui_username(old.loginuid)
-@@ -1631,7 +1643,8 @@ to exit.
+@@ -1631,7 +1649,8 @@ to exit.
_pkg_states_available.values())])[-1]
_pkg_states_installed['maxlen'] = maxlen
_pkg_states_available['maxlen'] = maxlen
@@ -263,7 +367,7 @@ index b1d92e5..08fe0e3 100755
prefix = " " * prefix_len
if was_installed:
_pkg_states = _pkg_states_installed
-@@ -1655,7 +1668,9 @@ to exit.
+@@ -1655,7 +1674,9 @@ to exit.
else:
(hibeg, hiend) = self._highlight('normal')
state = utf8_width_fill(state, _pkg_states['maxlen'])
@@ -274,7 +378,14 @@ index b1d92e5..08fe0e3 100755
if type(old.tid) == type([]):
print _("Transaction ID :"), "%u..%u" % (old.tid[0], old.tid[-1])
-@@ -1732,24 +1747,31 @@ to exit.
+@@ -1726,30 +1747,37 @@ to exit.
+ addon_info = self.history.return_addon_data(old.tid)
+
+ # for the ones we create by default - don't display them as there
+- default_addons = set(['config-main', 'config-repos'])
++ default_addons = set(['config-main', 'config-repos', 'saved_tx'])
+ non_default = set(addon_info).difference(default_addons)
+ if len(non_default) > 0:
print _("Additional non-default information stored: %d"
% len(non_default))
@@ -310,7 +421,7 @@ index b1d92e5..08fe0e3 100755
if old.output:
print _("Scriptlet output:")
-@@ -1783,10 +1805,13 @@ to exit.
+@@ -1783,10 +1811,13 @@ to exit.
# version in the transaction and now.
all_uistates = self._history_state2uistate
maxlen = 0
@@ -324,7 +435,7 @@ index b1d92e5..08fe0e3 100755
for hpkg in old.trans_data:
prefix = " " * 4
-@@ -1813,18 +1838,18 @@ to exit.
+@@ -1813,18 +1844,18 @@ to exit.
hpkg.state == 'Update'):
ln = len(hpkg.name) + 1
cn = (" " * ln) + cn[ln:]
@@ -346,7 +457,7 @@ index b1d92e5..08fe0e3 100755
def historySummaryCmd(self, extcmds):
tids, printall = self._history_list_transactions(extcmds)
-@@ -1936,6 +1961,9 @@ to exit.
+@@ -1936,6 +1967,9 @@ to exit.
of a package(s) instead of via. transactions. """
tids = self.history.search(extcmds)
limit = None
@@ -424,18 +535,97 @@ index e8f4459..121ad5b 100644
reserrors = []
if tserrors:
diff --git a/test/skipbroken-tests.py b/test/skipbroken-tests.py
-index 4e6b2c8..31482bc 100644
+index 4e6b2c8..36a4a6d 100644
--- a/test/skipbroken-tests.py
+++ b/test/skipbroken-tests.py
-@@ -669,7 +669,7 @@ class SkipBrokenTests(DepsolveTests):
+@@ -1,8 +1,11 @@
+ import unittest
+ import logging
+ import sys
++import re
+ from testbase import *
+
++REGEX_PKG = re.compile(r"(\d*):?(.*)-(.*)-(.*)\.(.*)$")
++
+ class SkipBrokenTests(DepsolveTests):
+ ''' Test cases to test skip-broken'''
+
+@@ -20,6 +23,36 @@ class SkipBrokenTests(DepsolveTests):
+ po = FakePackage(name, version, release, epoch, arch, repo=self.repo)
+ self.rpmdb.addPackage(po)
+ return po
++
++ def _pkgstr_to_nevra(self, pkg_str):
++ '''
++ Get a nevra from from a epoch:name-version-release.arch string
++ @param pkg_str: package string
++ '''
++ res = REGEX_PKG.search(pkg_str)
++ if res:
++ (e,n,v,r,a) = res.groups()
++ if e == "":
++ e = "0"
++ return (n,e,v,r,a)
++ else:
++ raise AttributeError("Illegal package string : %s" % pkg_str)
++
++ def repoString(self, pkg_str):
++ '''
++ Add an available package from a epoch:name-version-release.arch string
++ '''
++ (n,e,v,r,a) = self._pkgstr_to_nevra(pkg_str)
++ return self.repoPackage(n,v,r,e,a)
++
++
++ def instString(self, pkg_str):
++ '''
++ Add an installed package from a epoch:name-version-release.arch string
++ '''
++ (n,e,v,r,a) = self._pkgstr_to_nevra(pkg_str)
++ return self.instPackage(n,v,r,e,a)
++
+
+ def testMissingReqNoSkip(self):
+ ''' install fails, because of missing req.
+@@ -669,8 +702,37 @@ class SkipBrokenTests(DepsolveTests):
self.tsInfo.addUpdate(u7, oldpo=i7)
self.assertEquals('ok', *self.resolveCode(skip=True))
# uncomment this line and the test will fail and you can see the output
- self.assertResult([i1])
+ # self.assertResult([i1])
++ def test_conflict_looping(self):
++ '''
++ Skip-broken is looping
++ https://bugzilla.redhat.com/show_bug.cgi?id=681806
++ '''
++ members = [] # the result after the transaction
++ # Installed package conflicts with u1
++ i0 = self.instString('kde-l10n-4.6.0-3.fc15.1.noarch')
++ i0.addConflicts('kdepim', 'GT', ('6', '4.5.9', '0'))
++ members.append(i0)
++ i1 = self.instString('6:kdepim-4.5.94.1-1.fc14.x86_64')
++ u1 = self.repoString('7:kdepim-4.4.10-1.fc15.x86_64')
++ self.tsInfo.addUpdate(u1, oldpo=i1)
++ # u1 should be removed, because of the conflict
++ members.append(i1)
++ i2 = self.instString('6:kdepim-libs-4.5.94.1-1.fc14.x86_64')
++ u2 = self.repoString('7:kdepim-libs-4.4.10-1.fc15.x86_64')
++ self.tsInfo.addUpdate(u2, oldpo=i2)
++ members.append(u2)
++ i3 = self.instString('kdepim-runtime-libs-4.5.94.1-2.fc14.x86_64')
++ u3 = self.repoString('1:kdepim-runtime-libs-4.4.10-2.fc15.x86_64')
++ self.tsInfo.addUpdate(u3, oldpo=i3)
++ members.append(u3)
++ i4 = self.instString('kdepim-runtime-4.5.94.1-2.fc14.x86_64')
++ u4 = self.repoString('1:kdepim-runtime-4.4.10-2.fc15.x86_64')
++ self.tsInfo.addUpdate(u4, oldpo=i4)
++ members.append(u4)
++ self.assertEquals('ok', *self.resolveCode(skip=True))
++ self.assertResult(members)
+ def resolveCode(self,skip = False):
diff --git a/yum.spec b/yum.spec
index a1fbc72..65a2397 100644
--- a/yum.spec
@@ -452,7 +642,7 @@ index a1fbc72..65a2397 100644
%config(noreplace) %{_sysconfdir}/sysconfig/yum-cron
diff --git a/yum/__init__.py b/yum/__init__.py
-index f6e8a6b..5c44245 100644
+index f6e8a6b..36fc203 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -349,7 +349,10 @@ class YumBase(depsolve.Depsolve):
@@ -588,7 +778,27 @@ index f6e8a6b..5c44245 100644
if already_obs:
self.verbose_logger.warning(_('Package %s is obsoleted by %s which is already installed'),
-@@ -4462,17 +4484,20 @@ class YumBase(depsolve.Depsolve):
+@@ -3934,11 +3956,17 @@ class YumBase(depsolve.Depsolve):
+ if (po.arch != installed_pkg.arch and
+ (isMultiLibArch(po.arch) or
+ isMultiLibArch(installed_pkg.arch))):
+- installpkgs.append(po)
++ if updateonly:
++ self.logger.warning(_('Package %s.%s not installed, cannot update it. Run yum install to install it instead.'), po.name, po.arch)
++ else:
++ installpkgs.append(po)
+ else:
+ donothingpkgs.append(po)
+ elif self.allowedMultipleInstalls(po):
+- installpkgs.append(po)
++ if updateonly:
++ self.logger.warning(_('Package %s.%s not installed, cannot update it. Run yum install to install it instead.'), po.name, po.arch)
++ else:
++ installpkgs.append(po)
+ else:
+ donothingpkgs.append(po)
+
+@@ -4462,17 +4490,20 @@ class YumBase(depsolve.Depsolve):
be imported using askcb.
@param po: Package object to retrieve the key of.
@@ -613,7 +823,7 @@ index f6e8a6b..5c44245 100644
for keyurl in keyurls:
keys = self._retrievePublicKey(keyurl, repo)
-@@ -4509,7 +4534,8 @@ class YumBase(depsolve.Depsolve):
+@@ -4509,7 +4540,8 @@ class YumBase(depsolve.Depsolve):
rc = askcb(po, info['userid'], info['hexkeyid'])
if not rc:
@@ -623,7 +833,7 @@ index f6e8a6b..5c44245 100644
# Import the key
ts = self.rpmdb.readOnlyTS()
-@@ -4520,6 +4546,9 @@ class YumBase(depsolve.Depsolve):
+@@ -4520,6 +4552,9 @@ class YumBase(depsolve.Depsolve):
self.logger.info(_('Key imported successfully'))
key_installed = True
@@ -633,7 +843,7 @@ index f6e8a6b..5c44245 100644
if not key_installed:
raise Errors.YumBaseError, \
_('The GPG keys listed for the "%s" repository are ' \
-@@ -4543,11 +4572,13 @@ class YumBase(depsolve.Depsolve):
+@@ -4543,11 +4578,13 @@ class YumBase(depsolve.Depsolve):
@param destdir: destination of the gpg pub ring
@param keyurl_list: list of urls for gpg keys
@param is_cakey: bool - are we pulling in a ca key or not
@@ -649,7 +859,7 @@ index f6e8a6b..5c44245 100644
for keyurl in keyurl_list:
keys = self._retrievePublicKey(keyurl, repo, getSig=not is_cakey)
for info in keys:
-@@ -4557,16 +4588,25 @@ class YumBase(depsolve.Depsolve):
+@@ -4557,16 +4594,25 @@ class YumBase(depsolve.Depsolve):
keyurl, info['hexkeyid']))
key_installed = True
continue
@@ -680,7 +890,7 @@ index f6e8a6b..5c44245 100644
self._getKeyImportMessage(info, keyurl, keytype)
rc = False
if self.conf.assumeyes:
-@@ -4579,7 +4619,8 @@ class YumBase(depsolve.Depsolve):
+@@ -4579,7 +4625,8 @@ class YumBase(depsolve.Depsolve):
if not rc:
@@ -690,7 +900,7 @@ index f6e8a6b..5c44245 100644
# Import the key
result = misc.import_key_to_pubring(info['raw_key'], info['hexkeyid'], gpgdir=destdir)
-@@ -4587,6 +4628,20 @@ class YumBase(depsolve.Depsolve):
+@@ -4587,6 +4634,20 @@ class YumBase(depsolve.Depsolve):
raise Errors.YumBaseError, _('Key import failed')
self.logger.info(_('Key imported successfully'))
key_installed = True
@@ -711,7 +921,7 @@ index f6e8a6b..5c44245 100644
if not key_installed:
raise Errors.YumBaseError, \
-@@ -4775,26 +4830,31 @@ class YumBase(depsolve.Depsolve):
+@@ -4775,26 +4836,31 @@ class YumBase(depsolve.Depsolve):
def _doTestTransaction(self,callback,display=None):
''' Do the RPM test transaction '''
@@ -762,7 +972,7 @@ index f6e8a6b..5c44245 100644
tsConf = {}
for feature in ['diskspacecheck']: # more to come, I'm sure
-@@ -4804,14 +4864,7 @@ class YumBase(depsolve.Depsolve):
+@@ -4804,14 +4870,7 @@ class YumBase(depsolve.Depsolve):
# overwrite the default display class
if display:
testcb.display = display
@@ -777,7 +987,7 @@ index f6e8a6b..5c44245 100644
tserrors = self.ts.test( testcb, conf=tsConf )
del testcb
-@@ -4839,12 +4892,8 @@ class YumBase(depsolve.Depsolve):
+@@ -4839,12 +4898,8 @@ class YumBase(depsolve.Depsolve):
cb.display = display
self.runTransaction( cb=cb )
@@ -791,7 +1001,7 @@ index f6e8a6b..5c44245 100644
self.ts.check()
for prob in self.ts.problems():
# Newer rpm (4.8.0+) has problem objects, older have just strings.
-@@ -4852,7 +4901,6 @@ class YumBase(depsolve.Depsolve):
+@@ -4852,7 +4907,6 @@ class YumBase(depsolve.Depsolve):
# now just be compatible.
results.append(to_str(prob))
@@ -800,7 +1010,7 @@ index f6e8a6b..5c44245 100644
def add_enable_repo(self, repoid, baseurls=[], mirrorlist=None, **kwargs):
diff --git a/yum/config.py b/yum/config.py
-index 97e5e3d..9c2db93 100644
+index 97e5e3d..8c966f8 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -691,6 +691,7 @@ class YumConf(StartupConf):
@@ -811,8 +1021,36 @@ index 97e5e3d..9c2db93 100644
rpm_check_debug = BoolOption(True)
disable_excludes = ListOption()
skip_broken = BoolOption(False)
+@@ -1050,10 +1051,24 @@ def writeRawRepoFile(repo,only=None):
+ # Updated the ConfigParser with the changed values
+ cfgOptions = repo.cfg.options(repo.id)
+ for name,value in repo.iteritems():
++ if value is None: # Proxy
++ continue
++
++ if only is not None and name not in only:
++ continue
++
+ option = repo.optionobj(name)
+- if option.default != value or name in cfgOptions :
+- if only == None or name in only:
+- ini[section_id][name] = option.tostring(value)
++ ovalue = option.tostring(value)
++ # If the value is the same, but just interpreted ... when we don't want
++ # to keep the interpreted values.
++ if (name in ini[section_id] and
++ ovalue == varReplace(ini[section_id][name], yumvar)):
++ ovalue = ini[section_id][name]
++
++ if name not in cfgOptions and option.default == value:
++ continue
++
++ ini[section_id][name] = ovalue
+ fp =file(repo.repofile,"w")
+ fp.write(str(ini))
+ fp.close()
diff --git a/yum/depsolve.py b/yum/depsolve.py
-index de2849a..8f18ccc 100644
+index de2849a..388811d 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -69,6 +69,8 @@ class Depsolve(object):
@@ -839,7 +1077,22 @@ index de2849a..8f18ccc 100644
self.verbose_logger.log(logginglevels.DEBUG_1,
_('Adding Package %s in mode %s'), txmbr.po, txmbr.ts_state)
if self.dsCallback:
-@@ -799,9 +806,9 @@ class Depsolve(object):
+@@ -673,11 +680,12 @@ class Depsolve(object):
+ if len(self.tsInfo) != length and txmbrs:
+ return CheckDeps, errormsgs
+
+- msg = '%s conflicts with %s' % (name, conflicting_po.name)
++ msg = '%s conflicts with %s' % (name, str(conflicting_po))
+ errormsgs.append(msg)
+ self.verbose_logger.log(logginglevels.DEBUG_1, msg)
+ CheckDeps = False
+- self.po_with_problems.add((po,None,errormsgs[-1]))
++ # report the conflicting po, so skip-broken can remove it
++ self.po_with_problems.add((po,conflicting_po,errormsgs[-1]))
+ return CheckDeps, errormsgs
+
+ def _undoDepInstalls(self):
+@@ -799,9 +807,9 @@ class Depsolve(object):
continue
done.add((po, err))
self.verbose_logger.log(logginglevels.DEBUG_4,
@@ -1555,7 +1808,7 @@ index 83e56c6..39fa72e 100644
try:
un = UpdateNotice(elem)
diff --git a/yumcommands.py b/yumcommands.py
-index ecce347..62b8746 100644
+index ecce347..41f0092 100644
--- a/yumcommands.py
+++ b/yumcommands.py
@@ -46,7 +46,7 @@ def checkRootUID(base):
@@ -1567,6 +1820,15 @@ index ecce347..62b8746 100644
msg = _("""
You have enabled checking of packages via GPG keys. This is a good thing.
However, you do not have any GPG public keys installed. You need to download
+@@ -283,7 +283,7 @@ class InfoCommand(YumCommand):
+ return ['info']
+
+ def getUsage(self):
+- return "[PACKAGE|all|installed|updates|extras|obsoletes|recent]"
++ return "[PACKAGE|all|available|installed|updates|extras|obsoletes|recent]"
+
+ def getSummary(self):
+ return _("Display details about a package or group of packages")
@@ -626,13 +626,14 @@ class CheckUpdateCommand(YumCommand):
checkEnabledRepo(base)
@@ -1597,7 +1859,7 @@ index ecce347..62b8746 100644
if not os.path.exists(repo.metadata_cookie):
last = _("Unknown")
diff --git a/yummain.py b/yummain.py
-index c64b140..32c65aa 100755
+index c64b140..d0b8251 100755
--- a/yummain.py
+++ b/yummain.py
@@ -23,6 +23,7 @@ import os.path
@@ -1608,7 +1870,23 @@ index c64b140..32c65aa 100755
from yum import Errors
from yum import plugins
-@@ -99,12 +100,16 @@ def main(args):
+@@ -75,6 +76,15 @@ def main(args):
+ return 200
+ return 0
+
++ def rpmdb_warn_checks():
++ try:
++ probs = base._rpmdb_warn_checks(out=verbose_logger.info, warn=False)
++ except YumBaseError, e:
++ # This is mainly for PackageSackError from rpmdb.
++ verbose_logger.info(_(" Yum checks failed: %s"), exception2msg(e))
++ probs = []
++ if not probs:
++ verbose_logger.info(_(" You could try running: rpm -Va --nofiles --nodigest"))
+
+ logger = logging.getLogger("yum.main")
+ verbose_logger = logging.getLogger("yum.verbose.main")
+@@ -99,12 +109,16 @@ def main(args):
if exception2msg(e) != lockerr:
lockerr = exception2msg(e)
logger.critical(lockerr)
@@ -1626,7 +1904,17 @@ index c64b140..32c65aa 100755
else:
logger.critical(_("Another app is currently holding the yum lock; exiting as configured by exit_on_lock"))
return 1
-@@ -205,7 +210,7 @@ def main(args):
+@@ -177,8 +191,7 @@ def main(args):
+ logger.critical(prefix, msg.replace('\n', '\n' + prefix2nd))
+ if not base.conf.skip_broken:
+ verbose_logger.info(_(" You could try using --skip-broken to work around the problem"))
+- if not base._rpmdb_warn_checks(out=verbose_logger.info, warn=False):
+- verbose_logger.info(_(" You could try running: rpm -Va --nofiles --nodigest"))
++ rpmdb_warn_checks()
+ if unlock(): return 200
+ return 1
+ elif result == 2:
+@@ -205,13 +218,12 @@ def main(args):
except IOError, e:
return exIOError(e)
@@ -1635,3 +1923,10 @@ index c64b140..32c65aa 100755
if type(return_code) == type((0,)) and len(return_code) == 2:
(result, resultmsgs) = return_code
for msg in resultmsgs:
+ logger.critical("%s", msg)
+- if not base._rpmdb_warn_checks(out=verbose_logger.info, warn=False):
+- verbose_logger.info(_(" You could try running: rpm -Va --nofiles --nodigest"))
++ rpmdb_warn_checks()
+ return_code = result
+ if base._ts_save_file:
+ verbose_logger.info(_("Your transaction was saved, rerun it with: yum load-transaction %s") % base._ts_save_file)
diff --git a/yum.spec b/yum.spec
index 6b68000..32008e8 100644
--- a/yum.spec
+++ b/yum.spec
@@ -7,7 +7,7 @@
Summary: RPM package installer/updater/manager
Name: yum
Version: 3.2.29
-Release: 8%{?dist}
+Release: 9%{?dist}
License: GPLv2+
Group: System Environment/Base
Source0: http://yum.baseurl.org/download/3.2/%{name}-%{version}.tar.gz
@@ -246,6 +246,9 @@ exit 0
%config(noreplace) %{_sysconfdir}/sysconfig/yum-cron
%changelog
+* Fri Mar 25 2011 Seth Vidal <skvidal at fedoraproject.org> - 3.2.29-9
+- update to latest HEAD
+
* Mon Feb 28 2011 Seth Vidal <skvidal at fedoraproject.org> - 3.2.29-8
- take out the hack-patch from 2 weeks ago.
More information about the scm-commits
mailing list