(un)markauto tries to remove packages unnecessarily
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
aptitude (Ubuntu) |
Incomplete
|
Low
|
Unassigned |
Bug Description
Binary package hint: aptitude
On gutsy, using aptitude unmarkauto or aptitude markauto, to change the automatically installed status of a package
that does not have any other packages dependent on it, causes aptitude to remove the package.
For example:
$ aptitude search ~neukleides
i A eukleides - Euclidean geometry drawing language
i xeukleides - System for drawing and viewing Euclidean geometry figures
xeukleides depends on eukleides, I can mark eukleides as not automatically installed without any problems:
$ sudo aptitude unmarkauto eukleides
[...]
$ aptitude search ~neukleides
i eukleides - Euclidean geometry drawing language
i xeukleides - System for drawing and viewing Euclidean geometry figures
And I can mark eukleides as automatically installed again:
$ sudo aptitude unmarkauto eukleides
[...]
$ aptitude search ~neukleides
i A eukleides - Euclidean geometry drawing language
i xeukleides - System for drawing and viewing Euclidean geometry figures
No packages depend on xeukleides. When I try to mark xeukleides as automatically installed, aptitude wants to remove xeukleides:
$ aptitude -s markauto xeukleides
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following packages are unused and will be REMOVED:
eukleides xeukleides
0 packages upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 872kB will be freed.
Do you want to continue? [Y/n/?]
Would download/
I now remove xeukleides:
$ sudo apt-get remove xeukleides
[...]
The following packages were automatically installed and are no longer required:
eukleides
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
xeukleides
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives.
After unpacking 254kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 160896 files and directories currently installed.)
Removing xeukleides ...
Now no packages depend on eukleides, I try to mark eukleides as not automatically installed and aptitude wants to remove it:
$ aptitude -s unmarkauto eukleides
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following packages are unused and will be REMOVED:
eukleides
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 618kB will be freed.
Do you want to continue? [Y/n/?]
Would download/
I'm using aptitude version 0.4.6.1:
$ aptitude --version
aptitude 0.4.6.1 compiled at Sep 15 2007 09:21:46
Compiler: g++ 4.1.3 20070831 (prerelease) (Ubuntu 4.1.2-16ubuntu1)
NCurses version: 5.6
libsigc++ version: 2.0.17
summary: |
- (un)markauto tries to remove packages + (un)markauto tries to remove packages unnecessarily |
no longer affects: | aptitude (Debian) |
> $ aptitude -s unmarkauto eukleides
This also "works" when omitting the -s, IOW, doing the real thing, not a simulation.
It looks like the removal of the still-automarked package is done before aptitude can unmark it. Confirming with low priority as aptitude emits a list of what it intends to do before actually doing it.