Re: Behavior of aptitude and autoremoving
On 2010-10-11 17:15 +0200, Gard Spreemann wrote:
> First of all, I'll warn you that I use Ubuntu. Everybody is probably
> tired of Ubuntu users asking for help here, but I think my question
> applies equally well to Debian.
Yes, and I can reproduce your problem in Debian.
> I'm struggling to understand the autoremoval behavior of aptitude
> 0.6.3. Let's say I have a virtual package A provided by A1 and
> A2. Assume that A and A1 are installed, and that I then install
> A2. Installing A2 also pulls in a dependency B. Now, am I wrong to
> expect that "aptitude remove A2" should remove B for being unused (as
> well as removing A2 of course)? I'm pretty sure the previous aptitude
> I ran (0.4.11.11) did this.
Not necessarily. There may be other packages which depend on C | B, and
previously you had C installed but not B. In this case B is not unused.
> Here's a concrete example from Ubuntu Maverick (based on a quick
> glance at the Debian repositories it also applies to Debian
> experimental):
>
>
> $ aptitude install gcc-4.5
> The following NEW packages will be installed:
> cpp-4.5{a} gcc-4.5 libmpc2{a}
> *Snip*
>
> $ aptitude remove gcc-4.5
> The following packages will be REMOVED:
> gcc-4.5
>
> $ aptitude why libmpc2
> id cpp-4.5 Depends libmpc2
Now this is interesting. Although aptitude did not remove cpp-4.5
automatically, it has marked it for removal. When you start aptitude
without arguments and press "g", it should tell you that it will remove
cpp-4.5 and libmpc2. At least that's what I get in Debian
sid/experimental.
> To sum it up: cpp-4.5 seems to remain installed because gcc-4.5
> depends on it, even when gcc-4.5 is installed.
I think you mean "even when gcc-4.5 is *un*installed".
> The same relationship
> seems to hold between libmpc2 and gcc-4.5. Am I just confused?
No, I think you found a bug in aptitude.
Cheers,
Sven
Reply to: