On Mon, Sep 01, 2008 at 06:48:15AM +0800, [EMAIL PROTECTED] was heard to say:
> Package: aptitude
> Version: 0.4.11.9-1
> Severity: wishlist
> 
> In http://lists.debian.org/debian-user/2008/08/msg02342.html
> >>>>> "DB" == Daniel Burrows <[EMAIL PROTECTED]> writes:
> 
> DB> On Wed, Aug 27, 2008 at 07:53:56AM +0800, [EMAIL PROTECTED] was heard to 
> say:
> > I find no way in aptitude to
> > # aptitude install telnet-ssl
> > Reading package lists... Done  <- Get rid of these messages, and
> > The following NEW packages will be installed:
> >   telnet-ssl
> > The following packages will be REMOVED:
> >   telnet{a} <- also purge instead of removing. I.e., nothing like
> > APT::Get::Purge. The undocumented --purge doesn't work like apt-get's.
> 
> DB>   There is no --purge option,
> There is too, else there would be an error message if one used it, #434502.

  There is no --purge option to aptitude.  If you don't believe me,
consult the table of options in main.cc.

  However, getopt_long has a "feature" that treats an abbreviation for
an option as the option itself if it is unambiguous.  What you're seeing
is probably that --purge is handled as --purge-unused.  I actually wasn't
aware of this, but it should probably be documented in the manpage.

> DB>   According to the apt-get manual page, --purge purges anything that is
> DB> being removed.  The only thing I can think of that gets you close to
> DB> what you want is "aptitude -s install telnet-ssl '?action(remove)_'",
> DB> but I don't think that is really adequate (it won't handle stuff that
> DB> gets removed due in interactive dependency resolution, for instance).
> 
> DB>   I thought at first that I could just set all the stuff being removed
> DB> to be purged as well, just before aptitude shows its prompt.  But
> DB> that's not right either: the user should be able to cancel individual
> DB> purges and have that stick.  So I guess the only way out is to hack the
> DB> backend so that when a hypothetical Aptitude::Purge is enabled, it
> DB> flicks packages to "purge" when they're first marked for removal and
> DB> not afterwards.
> 
> All I know is I was happy with
> APT::Get::Purge "true";
> back in apt-get, and was dismayed that no such janitor exists in aptitude.
> 
> DB>   I suppose you could file a wishlist bug asking for this feature to be
> DB> added.
> 
> OK, I hereby file that bug. Thanks.
> 
> All you need to do perhaps is just before the final list of what to
> remove is shown to the user for approval, change all the removes to
> purges, if of course APT::Get::Purge or whatever you want to name it
> is true.

  Won't work -- it interacts badly with other aptitude features, like
being able to modify package states from the prompt.  Like I said, I'll
need to do this at the point that aptitude first sees that packages have
been removed by a non-aptitude agency (perhaps in cleanup_after_change).
I don't think the command-line action "remove" should be affected, since
aptitude actually has a "purge" action (i.e., by saying "remove" you're
explicitly asking aptitude not to purge that package).  But resolver
solutions that you apply should be affected, and unused packages being
deleted should be purged as if Purge-Unused was set.

  Daniel



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to