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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul Howarth <paul@xxxxxxxxxxxx> 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@xxxxxxx>
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 -- james@xxxxxxx
_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxx
http://lists.baseurl.org/mailman/listinfo/yum

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux