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

Paul Howarth <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
On 01/12/09 04:44, James Antill wrote:
> 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.

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.
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.