[Aptitude-devel] Bug#638049: aptitude forgets which packages were installed automatically

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Mon Jan 25 22:27:55 UTC 2016


2016-01-24 16:14 Harald Dunkel:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA256
>
>Hi Manuel,
>
>On 01/23/16 01:11, Manuel A. Fernandez Montecelo wrote:
>> Control: tags -1 + moreinfo
>>
>>
>> Hi Harald,
>>
>> 2011-08-16 21:07 Harald Dunkel:
>>>
>>> (I'd love to have some option in aptitude to mark all installed packages as automatically installed, except for those that do not appear on the Depends or Recommends list of any installed package. This would make the use of some high level meta packages much more interesting.)
>>
>> This can be done with patterns.
>>
>
>More info would be welcome.

  aptitude search '?installed(?not(?or(~RDepends:~i,~RRecommends:~i)))

Maybe you want to throw in ?RSuggests as well.

There can be oddities with virtual packages or other corner cases or
bugs, though, so tread with care if you use this in automated ways.


If you use the curses interface probably you're doing the following
already, but just in case...  it's relatively quick to mark all
Installed packages as auto-installed ('M') at once, and then mark the
ones that you don't want deleted as manually installed ('m').  Or at
least will be useful with packages in some sections, like "libs" or
"perl" or "python", you probably want most of them auto-installed
without further checking, because the packages to be marked "manual" are
very few, if any.


>> Did you keep an eye on this and saw this happening recently?
>
>I just have to look at the list of installed packages. There
>are some very weird packages that I *surely* did not install
>on purpose. They were installed via some dependency and lost
>the "automatically installed" flag later. Samples:
>
>	libpkcs11-helper1
>	libwildmidi-config
>	claws-mail-i18n
>	seabios
>	shared-desktop-ontologies
>	geoip-database
>	tons of weird perl package
>	even more weird python packages
>
>I am afraid the problem is still in.

There are cases where packages are marked as manually installed
(removing the auto-installed bit) where they shouldn't be, such as
marking them as "keep" (':') or selecting "Keep the following packages
at their current version" in conflicts.  Or using "Cancel pending
actions" in the menu.  I am fixing some of those for the next release.
Some of these bugs can be the cause of these packages being installed in
your system and not marked with the auto-flag after a while.

However, this does not mean that the problem described in the original
report and specially some subsequent messages is still valid with the
current version of aptitude (it was at the time, and thanks for
providing such a clear case!).  Or, even if it's "valid" because the
problem persists somewhere, if it's useful to keep around without
providing information that can lead to the underlying problems being
reproduced and fixed (specially after several years and many
changes/fixes in underlying libraries and aptitude itself).

So I don't want to close bugs gratuitously, but the problem that you
proved reproducible in some of the messages doesn't seem present, or
it's not happening with similar test cases now, and the merged bugs do
not provide any information either, so keeping them open for a few more
years is unlikely to get the problems fixed.


I was asking if this still happens in command line mode or some specific
command like full or safe-upgrade because I personally don't use that
mode very much, except when trying to reproduce people's bugs, and not
for my regular package management operations.  We have some heavy users
of the command line mode which are bug submitters, and that would have
probably reported something about this if it's a problem that affects
them, but...


Cheers.
-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>



More information about the Aptitude-devel mailing list