[pacman-dev] pac-file utility script
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
Hi Pete, Can you post the script inline so it would be easier for us to comment on. Thanks, Allan
pete morris wrote:
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.
No comments on the actual script yet (I will look through it over the weekend). I do like the idea of this script and it is a feature users have requests several times. However, it is currently Arch specific given it relies on file lists that are only created for the Arch repos. How about including Pierre's file list generation script in the scripts/ directory along with repo-add etc? I think these two really need to be added in combination. I am going to email Pierre and see how general his file list generation script is. Allan
On Fri, Jun 27, 2008 at 1:44 AM, Allan McRae <allan@archlinux.org> wrote:
pete morris wrote:
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.
No comments on the actual script yet (I will look through it over the weekend).
I do like the idea of this script and it is a feature users have requests several times. However, it is currently Arch specific given it relies on file lists that are only created for the Arch repos. How about including Pierre's file list generation script in the scripts/ directory along with repo-add etc? I think these two really need to be added in combination.
I am going to email Pierre and see how general his file list generation script is.
It's in the dbscripts git repo: http://projects.archlinux.org/?p=dbscripts.git;a=blob;f=cron-jobs/createFile...
Am Freitag, 27. Juni 2008 08:44:25 schrieb Allan McRae:
I do like the idea of this script and it is a feature users have requests several times. However, it is currently Arch specific given it relies on file lists that are only created for the Arch repos. How about including Pierre's file list generation script in the scripts/ directory along with repo-add etc? I think these two really need to be added in combination.
ATM the script is separated from repo-add and run by a cron job. I think it would be best to include it into repo-add. This way it would be quite independent from arch, more effective because repo-add knows which packages have changed and filelists and package dbs would allways be consistent. Last but not least this should simplify the script. Of course this should only be optional and enabled by a switch like "repo-add --with-filelists" -- Pierre Schmitz Clemens-August-Straße 76 53115 Bonn Telefon 0228 9716608 Mobil 0160 95269831 Jabber pierre@jabber.archlinux.de WWW http://www.archlinux.de
On Fri, Jun 27, 2008 at 6:44 PM, Pierre Schmitz <pierre@archlinux.de> wrote:
Of course this should only be optional and enabled by a switch like "repo-add --with-filelists" Sure, it must be optional. But couldn't it be enabled by default? I see a repository filelist as a standard feature (which I often miss with pacman-based systems)...
-- Geoffroy Carrier
participants (5)
-
Aaron Griffin
-
Allan McRae
-
Geoffroy Carrier
-
pete morris
-
Pierre Schmitz