[Aptitude-devel] Bug#713906: Bug#713906: autoinstall packages persist after purge

Daniel Hartwig mandyke at gmail.com
Mon Jun 24 05:18:09 UTC 2013


Control: severity -1 minor
Control: merge -1 590308
Control: tags -1 + confirmed

On 24 June 2013 02:03,  <jidanni at jidanni.org> wrote:
> Package: aptitude
> Version: 0.6.9.1-1

[This experimental version has been withdrawn, I recommend you
downgrade to the latest in unstable.]

>
> # aptitude -o APT::Install-Recommends=true install alsa-utils
> The following NEW packages will be installed:
>   alsa-base{a} (R: alsa-utils) (for alsa-utils)  alsa-utils
> # aptitude -o APT::Install-Recommends=true purge alsa-utils
> The following packages will be REMOVED:
>   alsa-utils{p}
>
> Maybe it's because the two mutually recommend each other.
>

Something like that.  An empty install run should remove the cruft:
# aptitude install

otherwise it will likely be cleaned up during some subsequent operation.


> Anyway here's my conf settings
>
> APT::Default-Release "experimental";//just order them in sources.list UNTRUE

[The order is significant only in choosing a server to download a
specific version from.]

>
> P.S. the man page says
>        -R, --without-recommends
>            Do not treat recommendations as dependencies when installing new
>            packages (this overrides settings in /etc/apt/apt.conf and
>            ~/.aptitude/config). Packages previously installed due to
>            recommendations will not be removed.
>
>            This corresponds to the pair of configuration options
>            Apt::Install-Recommends and Apt::AutoRemove::InstallRecommends.
>
>        -r, --with-recommends
>            Treat recommendations as dependencies when installing new packages
>            (this overrides settings in /etc/apt/apt.conf and
>            ~/.aptitude/config).
>
>            This corresponds to the configuration option
>            Apt::Install-Recommends
>
> But then oddly doesn't explain why Apt::AutoRemove::InstallRecommends is
> not affected by the latter.

[That should read ‘Apt::AutoRemove::RecommendsImportant’.  I have just
fixed it.]

The AutoRemove setting is only relevant to support the later part of
‘-R’, that is:
> Packages previously installed due to recommendations will
> not be removed.

The behaviour of aptitudes ‘--without-recommends’ is now handled in
apt by two components.  To maintain the traditional behaviour of this
option we have to _enable_ ‘RecommendsImportant’ to adjust the
autoremoval behaviour.  Nothing similar is required for
‘--with-recommends’ as there are no problematic interactions.

Such explanations are not suitable for the manual page.

>
> Also when you say 'corresponds' you should say if it corresponds to
> setting them false or true. Same with all the others on the man page.

Noted.  On my TODO list is to adopt a better style for these anyway,
including not documenting negative versions of options separately as
this only wastes space.

>
> P.S. reading
> file:///usr/share/doc/aptitude/html/en/ch02s02s06.html
> Managing automatically installed packages
> it seems like my assumptions in line with what it says...
> so something is wrong.
>
> Anyway please tell me how I can now clean up all the
> aptitude search ~M
> packages that even
> deborphan --guess-all
> can't detect shouldn't still be there.

Try:

# aptitude install \
 -oAPT::AutoRemove::RecommendsImportant=false \
 -oAPT::AutoRemove::SuggestsImportant=false

Although it may not select precisely the set you are interested in.

Regards



More information about the Aptitude-devel mailing list