FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 10-11-2010, 03:15 PM
Gard Spreemann
 
Default 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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4CB329FD.5000008@gmail.com">http://lists.debian.org/4CB329FD.5000008@gmail.com
 
Old 10-11-2010, 05:28 PM
Sven Joachim
 
Default 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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87lj64k59x.fsf@turtle.gmx.de">http://lists.debian.org/87lj64k59x.fsf@turtle.gmx.de
 
Old 10-11-2010, 05:52 PM
Arthur Machlas
 
Default Behavior of aptitude and autoremoving

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

AFAIK, it gets autoremoved it it was automatically installed AND if
there are no other packages on the system that depend AND/OR recommend
it, depending on your preferences. Otherwise it gets left on there.

Does aptitude purge ~c get rid of them though?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTik2ps6s4pVkdcWU3ywvLKK1AMLu0LKzLV5ey=Ps@mail .gmail.com">http://lists.debian.org/AANLkTik2ps6s4pVkdcWU3ywvLKK1AMLu0LKzLV5ey=Ps@mail .gmail.com
 
Old 10-11-2010, 06:35 PM
"Boyd Stephen Smith Jr."
 
Default Behavior of aptitude and autoremoving

In <87lj64k59x.fsf@turtle.gmx.de>, Sven Joachim wrote:
>On 2010-10-11 17:15 +0200, Gard Spreemann wrote:
>> $ 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.

I thought that only happened when you had a PreDepend or something like that,
where one package has a prerm/postrm script that depends on another package.
E.g. gcc-4.5 having a prerm that needs something from cpp-4.5.

In any case, I've seen it before, and I assume aptitude is doing it for good
reasons. Sometimes aptitude won't suggest a package be auto-removed until
*after* the "install/removal" run that removes something that Depends on it.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
 
Old 10-11-2010, 06:56 PM
Gard Spreemann
 
Default Behavior of aptitude and autoremoving

On Monday October 11 2010 19:28:42 Sven Joachim wrote:
> 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.

Right, I didn't think of that. Thanks for clarifying.

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

Yep, it does so here too. So I guess aptitude figures out the unused package
relationship just fine after gcc-4.5 was removed, but it just doesn't actually
perform the autoremoval?

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

Yes, definitely :-)

> No, I think you found a bug in aptitude.

Should I file a bug in the bug tracker or wait for more comments?


Thanks for replying!

--
Gard Spreemann
<spreeman@math.ntnu.no>, <spreeman@pvv.ntnu.no>, <gspreemann@gmail.com>
<http://folk.ntnu.no/spreeman>
 
Old 10-11-2010, 07:01 PM
Gard Spreemann
 
Default Behavior of aptitude and autoremoving

On Monday October 11 2010 19:52:35 Arthur Machlas wrote:
> Does aptitude purge ~c get rid of them though?

No, it doesn't.

--
Gard Spreemann
<spreeman@math.ntnu.no>, <spreeman@pvv.ntnu.no>, <gspreemann@gmail.com>
<http://folk.ntnu.no/spreeman>
 

Thread Tools




All times are GMT. The time now is 10:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org