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

Paul Howarth paul at city-fan.org
Tue Dec 1 10:16:34 UTC 2009


On 01/12/09 04:44, James Antill wrote:
> 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'))
>           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.

Better, but not quite right: it lists one of the obsoleted packages twice:

# yum update
Loaded plugins: presto, refresh-packagekit
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package perl-IO-Compress.noarch 0:2.023-1.fc12 set to be updated
--> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.023 for 
package: perl-IO-Compress-2.023-1.fc12.noarch
--> Running transaction check
---> Package perl-Compress-Raw-Bzip2.x86_64 0:2.023-1.fc12 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================
  Package                                    Arch 
Version                          Repository                       Size
=============================================================================================================================================
Installing:
  perl-IO-Compress                           noarch 
2.023-1.fc12                     city-fan.org                    209 k
      replacing  perl-IO-Compress-Zlib.noarch 2.015-1.fc12

      replacing  perl-IO-Compress-Zlib.noarch 2.015-1.fc12

      replacing  perl-IO-Compress-Base.noarch 2.015-1.fc12

      replacing  perl-Compress-Zlib.noarch 2.015-1.fc12

Installing for dependencies:
  perl-Compress-Raw-Bzip2                    x86_64 
2.023-1.fc12                     city-fan.org                     36 k

Transaction Summary
=============================================================================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total download size: 245 k
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 245 k
---------------------------------------------------------------------------------------------------------------------------------------------
Total 
                                      3.1 MB/s | 245 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
   Installing     : perl-Compress-Raw-Bzip2-2.023-1.fc12.x86_64 
                                                                   1/5
   Installing     : perl-IO-Compress-2.023-1.fc12.noarch 
                                                                   2/5
   Erasing        : perl-Compress-Zlib-2.015-1.fc12.noarch 
                                                                   3/5
   Erasing        : perl-IO-Compress-Base-2.015-1.fc12.noarch 
                                                                   4/5
   Erasing        : perl-IO-Compress-Zlib-2.015-1.fc12.noarch 
                                                                   5/5

Installed:
   perl-IO-Compress.noarch 0:2.023-1.fc12 


Dependency Installed:
   perl-Compress-Raw-Bzip2.x86_64 0:2.023-1.fc12 


Replaced:
   perl-Compress-Zlib.noarch 0:2.015-1.fc12 
perl-IO-Compress-Base.noarch 0:2.015-1.fc12 
perl-IO-Compress-Zlib.noarch 0:2.015-1.fc12

Complete!


perl-Compress-Zlib-2.015-1.fc12.noarch has been erased twice here.

(note: this was on a different machine, which didn't have one of the 
obsoleted packages installed; the installation of 
perl-Compress-Raw-Bzip2 as a dependency was expected).

Paul.


More information about the Yum mailing list