apt-get install $foo should clear the autoflag for $foo

Bug #72007 reported by jens_acamedia
2
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Fix Released
Wishlist
Michael Vogt

Bug Description

Binary package hint: apt

i did an 'apt-get remove ubuntu-desktop' on standard edgy so that i could then 'apt-get remove evolution etc'

as expected this worked fine and my system wasnt effected - great job developers!!

only one slight problem - i am now advised that almost all packages related to the desktop are no longer required and can be removed by 'apt-get autoremove'

but - this is actually a feature - since they were all presumably installed by ubuntu-desktop

the problem and bug is this - that when i explicitly install all the packages in the list they are still considered no longer required...they should not be considered as such when they have been explicitly installed...
-i need an answer to this in part because i want to make a custom ubuntu-distro so any advice in this direction would help - e.g. does the problem emerge if a system is installed without ubuntu-desktop but with all packages from a customized live-cd?

so for example i do 'apt-get install f-spot' and get this output:

Reading package lists... Done
Building dependency tree
Reading state information... Done
f-spot is already the newest version.
The following packages were automatically installed and are no longer required:
  f-spot libgnomecupsui1.0-1c2a tomboy evolution-webcal ekiga libglew1 openoffice.org-gnome gimp-print
.....blablabla LOTS OF PACKAGES.........
ssh-askpass-gnome linux-headers-2.6.17-10-generic sound-juicer libpisync0 hplip-data lftp
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Revision history for this message
jens_acamedia (commercial-acamedia) wrote :

id be very grateful, michael, if you could give me a hint as to how this might be fixed...

i would have assumed that explicitly installing the packages would remove them from the list of autoremove...that is clearly not the case...how can i proceed then?

thanks

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

Currently there is a tool called "apt-mark" that can be used to mark packages as explicitely installed. There is also support in synaptic (use Package/Automatically installed.

I think that "apt-get install $pkg" should clear the auto-flag if the package is already installed. This seems to be the most intuitive way.

Cheers,
 Michael

Changed in apt:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Revision history for this message
Lachlan (lachlan) wrote :

Yes, I experienced the same thing after removing evolution (an insanely slow app).

"apt-get install $pkg" does not clear this flag

"sudo apt-mark unmarkauto $pkg" does the trick.

usage: apt-mark [options] {markauto|unmarkauto} packages...

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

This should be fixed with the latest version of apt in feisty, please reopen if you still see this problem.

Cheers,
 Michael

Changed in apt:
assignee: nobody → mvo
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.