[Yum] Only 1 of multiple obsoletes mentioned in pre-transaction prompt

James Antill james-yum at and.org
Tue Dec 1 04:44:15 UTC 2009

Paul Howarth <paul at city-fan.org> writes:

> I just rolled myself a package of perl-IO-Compress, which
> obsoletes/provides perl-Compress-Zlib, perl-IO-Compress-Base,
> perl-IO-Compress-Zlib, and perl-IO-Compress-Bzip2. The resulting "yum
> update" looked like this:

 If you can try it again, try it with this patch:

commit 7c549a29197809864583dbbad13d7bc6f2b3611a
Author: James Antill <james at and.org>
Date:   Mon Nov 30 23:42:31 2009 -0500

    Add obsoleted packages to obsoleting txmbrs

diff --git a/yum/transactioninfo.py b/yum/transactioninfo.py
index c2fc804..5795425 100644
--- a/yum/transactioninfo.py
+++ b/yum/transactioninfo.py
@@ -487,6 +487,10 @@ class TransactionData:
         txmbr.relatedto.append((obsoleting_po, 'obsoletedby'))
+        for otxmbr in self.getMembersWithState(obsoleting_po.pkgtup,
+                                               [TS_OBSOLETING]):
+            otxmbr.relatedto.append((po, 'obsoletes'))
+            otxmbr.obsoletes.append(po)
         return txmbr

...it doesn't break any unittests, and I think it'll work.

James Antill -- james at and.org

More information about the Yum mailing list