[Aptitude-devel] Bug#141929: aptitude: searches for various non-interactive commands should use context info

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Wed May 4 15:18:52 UTC 2016


Control: tags -1 + wontfix
Control: close -1

Hi,

2002-04-09 13:32 Daniel Burrows:
>On Tue, Apr 09, 2002 at 04:11:40PM +0900, Miles Bader <miles at lsi.nec.co.jp> was heard to say:
>> It's very convenient that you can use aptitude `searches' to specify
>> packages for the various non-interactive commands (install, remove,
>> etc), but it would be even nicer if these searches were constrained in
>> a command-dependent manner.
>>
>> For instance, if I have `gnuplot' installed, and then use the command
>> `aptitude remove gnupl', it will prompt me:
>>
>>    Couldn't find package "gnupl".  However, the following
>>    packages contain "gnupl" in their name:
>>      gnuplot gnuplot-mode python-gnuplot
>
>  This is actually something different from the "searches", although your
>suggestion would be useful here.  (and in fact, maybe also in the case of
>specifying a search on the command line)
>  What's happening here is that you entered a single package to install,
>which didn't exist; aptitude is trying to guess what you might have been
>trying to do.
>
>  If you have said "aptitude remove ~ngnupl", you would have gotten this:
>
>Package gnuplot-mode is not installed, not removed
>Package python-gnuplot is installed, not removed.
>
>The following packages will be REMOVED:
>  gnuplot
>
>...
>
>  Daniel

So this is the explanation about what's going on here, the additional
"~i" makes the string to be treated as pattern, and thus the "gnupl"
converted to match part of a name.

In the original example it might make sense to proceed removing the
package with the similar name, but this is not OK if you make a typo in
similar named packages that you don't want to remove.

I think that the current behaviour is OK, and it's been established for
many years now, so closing this 14-year old bug because it doesn't make
sense to keep it open indefinitely.


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



More information about the Aptitude-devel mailing list