[arch-dev-public] Filename search for Arch

Aaron Griffin aaronmgriffin at gmail.com
Wed Jan 23 13:39:30 EST 2008


On Jan 23, 2008 12:10 PM, Thomas Bächler <thomas at archlinux.org> wrote:
> It is a much requested feature: Someone wants to search for a filename
> and get a package name, and there is no possibility in Arch.
>
> I have scripts to generate filelists from the package files which could
> run once a day or so. However, cactus (after a short jabber discussion)
> disagress with me on how the search would be done:
>
> My suggestion:
> Create a script on the webserver that "greps" through the prepared
> filelists or searches a sql database, then gives you a machine-readable
> output via xml or json that can be displayed in a client (for example a
> 'pacman -So' option).
> However, cactus thinks that this would put too much load on the server.
>
> Another possibility: Make the filelists available for (optional)
> download and search them offline (with pacman or another tool). My
> problem here is:
> total 140M
> -rw-r--r-- 1 thomas users  35M Jan 21 17:06 filelist.community-i686
> -rw-r--r-- 1 thomas users  34M Jan 21 17:11 filelist.community-x86_64
> -rw-r--r-- 1 thomas users 1.6M Jan 21 16:52 filelist.core-i686
> -rw-r--r-- 1 thomas users 1.6M Jan 21 16:52 filelist.core-x86_64
> -rw-r--r-- 1 thomas users  32M Jan 21 16:57 filelist.extra-i686
> -rw-r--r-- 1 thomas users  32M Jan 21 17:02 filelist.extra-x86_64
> -rw-r--r-- 1 thomas users 2.1M Jan 21 17:11 filelist.testing-i686
> -rw-r--r-- 1 thomas users 2.0M Jan 21 17:12 filelist.testing-x86_64
> -rw-r--r-- 1 thomas users 1.2M Jan 21 17:11 filelist.unstable-i686
> -rw-r--r-- 1 thomas users 673K Jan 21 17:11 filelist.unstable-x86_64
>
> Which is 8.9MB compressed with bz2, a lot to download if you have to
> update the lists every day to have an up-to-date version.
>
> What do you guys think?

I would implement this as follows:
Add some option to repo-add to generate a second list like above.
   "repo-add --filelists" would generate extra.files.tar.gz or something

Then a pacman config option like so:
SyncFilelists = yes

And everything else should flow from there.

Integrating json and xml parsing into pacman just seems.... wrong


More information about the arch-dev-public mailing list