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

Question about how "aptitude search" is used



  Hello list,

  I'd like to get a feel for how people use "aptitude search".

# Background #
  
  One of the things I'd like to implement in an upcoming aptitude
release (probably post-lenny, likely next year) is a significant
overhaul of the UI to the search engine; that is, how searches are
entered and carried out from the interface.

  In the current CLI, "aptitude search blah" searches for packages
whose name contains "blah".  In contrast, "apt-cache search blah"
searches both package names and descriptions.  What I'd really like to
do is a full-text search with approximate matches on the whole package
index that returns packages which might be relevant to "blah", with an
option to sort the results by various relevance metrics.  Of course,
"aptitude search ?name(blah)" will always be available; this is just
about changing the default behavior on bare strings.

# Problem #

  The problem that I see is that aptitude's current behavior is
predictable enough that people might be relying on it in home-grown
scripts.  Changing the semantics of a command underneath a script is
impolite at best and will likely break things.

  The alternative if I decide to maintain backwards-compatibility is
to write a second command like "aptitude find" or "aptitude grok" or
what-have-you, or to add some parameters to the "search" command
(something like "--full-search").  In the first case, I get to answer
user questions about the difference between "find" and "search" until
the end of time, while in the second case, I get to answer user
questions about how to search on more than just package names until the
end of time.

  So, I'd really like to just change the default behavior of "search"
when it's given a bare string.  If I were designing the program up-front
this is what I'd do, and I think it's the best end-point.

# Question #

  How many readers of this list are using "aptitude search" as a
subcommand in a script?  Will you be impacted by this change?  Will
anyone else be adversely impacted despite not using it in a script?

    Thanks,
  Daniel


Reply to: