[pacman-dev] pac-file utility script
pete morris
pete.morris at gmail.com
Wed Jun 25 14:58:43 EDT 2008
Hi all,
First a quick introduction, since this is my first message to the list. I am
a CS grad student at James Madison University in Harrisonburg, VA, and I also
do IT work for JMU's art department. I've been using arch for around 2.5
years now.
Anyway, I've written a script that takes advantage of the [repo].files.tar.gz
filelists that are now available to discover which package provides a
particular file, when that package is not installed on the user's machine. It
is similar to debian's apt-file, if you are familiar with that. I would
appreciate any comments on the script, with an eye toward possible inclusion
in Allan's pacman-contrib community package.
The script uses the mirrors defined in the user's /etc/pacman.d/mirrorlist and
downloads the filelists for the repos enabled in /etc/pacman.conf. It is
available from http://threadstates.com/downloads/pac-file.
The only major issue I can see is in the handling of non-standard repos,
including local ones. The repo names are obtained from pacman.conf's "[repo]"
lines, and the name of the repo is substituted for $repo in the mirror url
from the mirrorlist. If a local repo (for example) is defined in pacman.conf
as "[local]", on a 'sync' operation, pac-file will attempt to download
local.files.tar.gz from every mirror enabled in the mirrorlist. This will not
cause the script to fail (it will report that the file is unavailable from any
mirror and continue on), but it will waste time. I am hesitant to limit the
possible repos to the official ones because there might be third party repos
that provides filelists. Suggestions?
Thanks,
Pete
More information about the pacman-dev
mailing list