Re: Only 1 of multiple obsoletes mentioned in pre-transaction prompt

James Antill <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
Paul Howarth <[email protected]> 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 <[email protected]>
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'))
         txmbr.obsoleted_by.append(obsoleting_po)
         self.add(txmbr)
+        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 -- [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.