Searching for files and packages
David Nusinow writes:
> In addition to the apt-file command already mentioned, there's
> packages.debian.org, which is able to search package contents for you. If you
> happen to wander in to the gauntlet that is #debian on freenode, it's often
> abbreviated "p.d.o" because it's so useful.
We were talking about that on #d-w the other day, and I mentioned
that I seldom used the web page because it seemed like a hassle to
scroll to the right place, click in the text field, type in my
search string, then change the dropdown to something other than
"stable". But apt-cache search, aptitude search, and dpkg -l
all show lots of outdated packages that don't actually exist,
and I wanted some way of querying only for real packages.
So I got motivated to make commandline aliases to handle
querying for packages and files in sarge and sid.
These use links (the ascii browser), but it's easy enough to change
them to use links -dump, lynx, mozilla-remote, or whatever html viewer
you prefer. They're tcsh alias syntax; add = as needed for bash.
alias sargepkg 'links "http://packages.debian.org/cgi-bin/search_packages.pl?keywords=\!*&searchon=names&subword=1&version=testing&release=all"'
alias sidpkg 'links "http://packages.debian.org/cgi-bin/search_packages.pl?keywords=\!*&searchon=names&subword=1&version=unstable&release=all"'
alias sargefile 'links "http://packages.debian.org/cgi-bin/search_contents.pl?word=\!*&searchmode=searchword&case=insensitive&version=testing&arch=i386"'
alias sidfile 'links "http://packages.debian.org/cgi-bin/search_contents.pl?word=\!*&searchmode=searchword&case=insensitive&version=unstable&arch=i386"'
I still don't like these as much as aptitude search (for one thing,
they're slow, and for another, packages display on multiple lines so
they're not suitable to be piped through grep). Does anyone know of
a way to make apt-cache, aptitude, or dpkg show only packages that
actually exist and can be installed?