[yum-commits] 4 commits - docs/yum.conf.5 test/simpleupdatetests.py yum/depsolve.py
James Antill
james at osuosl.org
Tue Sep 2 15:16:27 UTC 2014
docs/yum.conf.5 | 7 ++++---
test/simpleupdatetests.py | 19 +++++++++++++++++++
yum/depsolve.py | 2 ++
3 files changed, 25 insertions(+), 3 deletions(-)
New commits:
commit 3c15099fd0fa6c320581177e85b7533fee887260
Author: James Antill <james at and.org>
Date: Tue Sep 2 11:16:18 2014 -0400
Fix removing installed obsoleted package. BZ 1135715.
diff --git a/yum/depsolve.py b/yum/depsolve.py
index cb0ebea..797826f 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -1364,6 +1364,8 @@ class Depsolve(object):
opkgs.append(po)
for obs_name,f,v in obsoletes:
for otxmbr in self.tsInfo.matchNaevr(name=obs_name):
+ if (otxmbr.output_state not in TS_INSTALL_STATES):
+ continue
if not otxmbr.po.obsoletedBy([po]):
continue
if po.obsoletedBy([otxmbr.po]): # Loops, hope for rpm.
commit 7cd6563d54987a757fab45eb417db37e049fe500
Author: James Antill <james at and.org>
Date: Tue Sep 2 11:15:29 2014 -0400
Add testcase for removing installed obsoleted package. BZ 1135715.
diff --git a/test/simpleupdatetests.py b/test/simpleupdatetests.py
index ba65e55..bc74de6 100644
--- a/test/simpleupdatetests.py
+++ b/test/simpleupdatetests.py
@@ -1230,3 +1230,22 @@ class SimpleUpdateTests(OperationsTests):
self.assert_(self._pkg2txmbr(foo11).reason == 'user')
self.assert_(self._pkg2txmbr(bar11).reason == 'blahg')
+
+ def testUpdate_installed_obs(self):
+ # Not sure how this happens (foo11 shouldn't be installed with bar11),
+ # but it did: BZ 1135715
+ foo11 = FakePackage('foo', '1', '1', '0', 'i386')
+ foo12 = FakePackage('foo', '1', '2', '0', 'i386')
+
+ bar11 = FakePackage('bar', '1', '1', '0', 'i386')
+ bar11.addObsoletes('foo', None, (None, None, None))
+
+ baz11 = FakePackage('baz', '1', '1', '0', 'i386')
+ baz12 = FakePackage('baz', '1', '2', '0', 'i386')
+ baz12.addObsoletes('foo', None, (None, None, None))
+
+ res, msg = self.runOperation(['upgrade'], [foo11, bar11, baz11],
+ [foo11, bar11, baz11, foo12, baz12])
+
+ self.assert_(res=='ok', msg)
+ self.assertResult((bar11,baz12))
commit 1057952fd8662122c0e45730ce9f652472d361ae
Merge: cad9d43 9653b9b
Author: James Antill <james at and.org>
Date: Tue Sep 2 10:54:57 2014 -0400
Merge branch 'master' of ssh://yum.baseurl.org/srv/projects/yum/git/yum
* 'master' of ssh://yum.baseurl.org/srv/projects/yum/git/yum: (2 commits)
verifyPkg() - make an error message a little bit more helpful. BZ 1104995
...
commit cad9d4384253d7d757f7797731d84ac2860bace9
Author: Peter Oliver <git at mavit.org.uk>
Date: Thu Jul 3 20:00:20 2014 +0100
Reword description of alwaysprompt option to remove double-negative.
diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
index 1596166..97acbe4 100644
--- a/docs/yum.conf.5
+++ b/docs/yum.conf.5
@@ -128,10 +128,11 @@ Command-line option: \fB\--assumeno\fP
.IP
\fBalwaysprompt\fR
-Either `1' or `0'. Without this option, yum will not prompt for confirmation
+Either `1' or `0'. When set to `0', yum will not prompt for confirmation
when the list of packages to be installed exactly matches those given on the
-command line. Unless \fBassumeyes\fR is enabled, it will still prompt when
-additional packages need to be installed to fulfill dependencies. Note that
+command line. Unless \fBassumeyes\fR is enabled, it will prompt when
+additional packages need to be installed to fulfill dependencies
+regardless of this setting. Note that
older versions of yum would also always prompt for package removal, and that is
no longer true.
Default is `1'.
More information about the Yum-commits
mailing list