[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question about how "aptitude search" is used



On Wed, Apr 16, 2008 at 08:02:21AM -0700, Andrew Sackville-West <andrew@farwestbilliards.com> was heard to say:
> On Tue, Apr 15, 2008 at 09:57:48PM -0700, Daniel Burrows wrote:
> > On Wed, Apr 16, 2008 at 12:38:46AM +0900, Osamu Aoki <osamu@debian.org> was heard to say:
> ...
> 
> > > You need to tell in NEWS file that local scripts need to add "~n" before
> > > serch string to make it act as before under the new version.
> > 
> >   My question was: are there any such local scripts?  It seems possible
> > to me that someone might have written a script that uses aptitude this
> > way, but I had trouble coming up with an actual reason I'd do that,
> > especially since the output from "aptitude search" is notably bad for
> > scripting.
> > 
> 
> I've hesitated to respond for just this issue. I can't come up with
> any good reason to script an aptitude search. Mainly because, what the
> heck would you do with the output in a script? If you parse the output
> to find a particular package, that sort of implies that you already
> know what the package is and could just (install|hold|purge|whatever)
> it anyway without bothering to search for it. 

  I know that some people have *tried* to write scripts using aptitude
because they filed bugs about how lousy the output format is when used
for this purpose, although you can make it work with, e.g.,

    aptitude search -F %p -w 1000 <term>

  I don't know if anyone is using this sort of stuff in practice; from
the replies on this thread, I'd say probably not.

  Daniel


Reply to: