Specifying How Yum Downloads Updates

Rahul Sundaram sundaram at fedoraproject.org
Wed Apr 15 15:26:39 UTC 2009


Bob Gustafson wrote:
> On Wed, 2009-04-15 at 09:38 -0500, Chris Adams wrote:
>> Once upon a time, Bob Gustafson <bobgus at rcn.com> said:
>>> Yes, I'm concerned about the ADDITIONAL packages removed by yum  
>>> because it does not maintain a reference count.
>>>
>>> It happened to me - 152 packages were removed. Many were critical to  
>>> the operation of my system.
>>> A reference counting package manager would not have done that.
>> What is this "reference counting" you keep mentioning?  How would it
>> have helped?
>>
>> You asked yum to do something, it displayed a list of all the actions it
>> was going to take as a result, and you said yes.  What else could it
>> have done?
>>
>> When you tell yum to remove a package that other packages depend on, it
>> can either remove all the dependencies, or not remove anything.
>> Anything else leaves broken packages in the system.  How would some
>> "reference counting" change that?
> 
> Suppose you have a package PkgA which requires libAB, libBB, libC
> 
> On installation of PkgA, it finds that libAB and libBB are already
> installed, having been installed with a previous package PkgB. It does
> install libC.
> 
> If you now remove PkgA, it finds that it depends on libAB, libBB, libC,
> which it displays in a list for the user to decide whether it is ok to
> also delete.

If remove a application that depends on the library, the library itself
will not be removed.

> If the user says Yes, all of the packages PkgA, libAB, libBB, libC are
> deleted, leaving the previously installed package PkgB with missing
> libAB, libBB dependencies.

This will never happen with Yum (or apt-get for that matter).  If you
try and remove a library that has both pkgA and pkgB as dependencies,
both will be prompted for removal. Neither dep resolver will break a dep
chain in the normal course of operations. Only way to do that in Fedora
 to force remove a package with rpm directly.
> 
> A reference counting scheme would detect that libAB and libBB are also
> used by another package and would not delete those two packages. Or
> offer to delete them.

This isn't how apt-get works really. The purpose of reference counting
(or any other similar method to remove leaf dependencies) is to remove a
library if it is no longer in use by any application.

Rahul




More information about the fedora-test-list mailing list