[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Behavior of aptitude and autoremoving



(Please CC me, I'm not subscribed).

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.

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.

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

$ aptitude why cpp-4.5
i   libtool Depends  gcc | c-compiler
p   gcc-4.5 Provides c-compiler
p   gcc-4.5 Depends  cpp-4.5 (= 4.5.1-7ubuntu2)

$ aptitude remove cpp-4.5
The following packages will be REMOVED:
  cpp-4.5

$ aptitude why libmpc2
i   libtool Depends  gcc | c-compiler
p   gcc-4.5 Provides c-compiler
p   gcc-4.5 Depends  libmpc2


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. The same relationship seems to hold between libmpc2 and gcc-4.5. Am I just confused?

I'll also add that I suspect that the role of the virtual package (in this case gcc) is of relevance here. The following simple example without virtual packages behaves correctly:


$ aptitude install xfig
The following NEW packages will be installed:
  xaw3dg{a} xfig

$ aptitude remove xfig
The following packages will be REMOVED:
  xaw3dg{u} xfig



Thanks in advance for any ideas.

--
Gard


Reply to: