[plug] Debian Package Management - automatic dependencies

Onno Benschop onno at itmaze.com.au
Mon Jul 25 12:40:13 WST 2005


Onno Benschop wrote:

> Nick Bannon wrote:
>
>> On Sat, Jul 23, 2005 at 06:18:06PM +0800, Peter F Bradshaw wrote:
>>
>>> I find that aptitude does a reasonable job in this regard most of the
>>> time. For instance 'aptitude upgrade' will probably find some unused
>>> packages and remove them.
>>>
>>
>> That is to say - aptitude keeps track of whether a package has been
>> specifically installed, or whether it was automatically pulled in due
>> to some other package's Depends/Recommends.
>>
> I was excited when I read about aptitude and to test it, over the 
> weekend I tried this and did:
>
>    aptitude install sylpheed
>
>
> The result was that the following packages were installed:
>
>    metamail sharutils sylpheed sylpheed-claws-scripts sylpheed-i18n
>
>
>
> But when I did:
>
>    aptitude purge sylpheed
>
>
> It only wanted to remove sylpheed. Instead I had to do:
>
>    apt-get --purge remove metamail sharutils sylpheed
>    sylpheed-claws-scripts sylpheed-i18n
>
>
>
> Did I miss anything, or do I need to set something up, because I was 
> expecting that aptitude would take care of it.
>
Yes, I did miss something, I just did it all again, during install 
aptitude displays:

    The following NEW packages will be installed:
      metamail sharutils sylpheed sylpheed-claws-scripts sylpheed-i18n


But during purge it says:

    The following packages will be REMOVED:
      sylpheed
    0 packages upgraded, 0 newly installed, 5 to remove and 521 not
    upgraded.



And if you look closely, above the 521 packages not being upgraded, 
you'd note the following:

    The following packages are unused and will be REMOVED:
      metamail sharutils sylpheed-claws-scripts sylpheed-i18n



So, indeed, aptitude does what I need to do :)


And I even tried:

    aptitude install sylpheed metamail
    aptitude purge sylpheed


And it took metamail which is not what I expected. I then tried

    aptitude install metamail
    aptitude install sylpheed
    aptitude purge sylpheed

Which installed metamail, then sylpheed, then removed sylpheed and the 
packages it installed, leaving metamail.


Thus, there is a catch. If you use aptitude for multi-package install, 
it can remove more than you bargained for, but otherwise it appears to 
do what I needed!

I'll check the bug reports and see if there is anything that points to 
this behaviour, otherwise I'll add one.


Anyway, thanks all for pointing me toward aptitude, all good.

-- 
Onno Benschop

Connected via Optus B3 at S34°45'36.5" - E139°00'08.7" (Mount Pleasant, SA)
--
()/)/)()        ..ASCII for Onno..
|>>?            ..EBCDIC for Onno..
--- -. -. ---   ..Morse for Onno..

Proudly supported by Skipper Trucks, Highway1, Concept AV, Sony Central, Dalcon
ITmaze   -   ABN: 56 178 057 063   -  ph: 04 1219 8888   -   onno at itmaze.com.au





More information about the plug mailing list