You are not logged in.
Pages: 1
Hello.
How do I find out, which package I need to install to get a certain file?
Example: I'd like to know what to install to get the rexec (/usr/bin/rexec) binary. Or /usr/**/*knode* (ie. any file containing "knode" anywhere underneath /usr). I want to know this for packages which I do NOT have installed. For installed packages/files, I could of course simply use
pacman -Qo /usr/bin/rexec
But how do that for not installed packages, ie. for sync databases?
Thanks,
Michael
Offline
It's impossible to search for a filename in a repository. It is only possible via some sort of hack; or finding the list that i know someone has posted on these forums of all the files that are in all the packages
Offline
a firefox search addon:
http://bbs.archlinux.org/viewtopic.php?id=42772
Offline
Hello!
It's impossible to search for a filename in a repository.
Yes, I know. I was hoping, that someone had some sort of web accessible database listing all the files and relating it to the respective package.
Something like PortageFileList (PFL) for Gentoo Linux, or Canoe Dissent for Blastwave (Solaris).
This should obviously be some sort of "community effort", so that it's also possible to cover all the AUR packages. All that would be required, is that somebody collects all the pacman -Ql listings of as many users as possible.
Long question short: Something like this doesn't exist for Arch, at least as of yet?
Thanks,
Micahel
PS: What package provides knode?
Offline
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
THAT is exactly, what I was looking for!
However, the script did not work, because the files stored on eg. http://dev.archlinux.org/~pierre/test-r … os/x86_64/ have been renamed. So I rewrote the script posted on the mailing list.
#! /usr/bin/env bash
store="$HOME/.local/share/pac-file" # default location
repos=(core extra community) # Default "stable" repos
#repos+=(testing unstable) # Additional repos
arch=$(uname -m)
arch="i686" # Force an architecture
url="http://dev.archlinux.org/~pierre/test-repo"
usage() {
echo "usage: $0 {-S|--sync|-h|--help|-?|<pattern>}"
echo "-S / --sync: Synchronize \"$store\""
echo " with $url"
echo "-h / --help / -?: Display this usage information"
echo "<pattern>: Search in \"$store\" for the"
echo " given pattern."
echo " Pattern can be an extended regular expression."
echo " This will list which package provides a certain file (ie."
echo " which matches the pattern."
echo
echo "Example:"
echo " $0 knode"
echo " -> Show all the packages which contain file(s) with \"knode\""
echo " in the filename/path"
echo " $0 '.*kn'"
echo " -> Show all the packages matching the regexp .*kn. Care should"
echo " be taken to quote/unescape special characters like *."
echo
}
if [[ "$arch" != "i686" && "$arch" != "x86_64" ]]; then
echo "Unsupported architecture \"$arch\"."
echo "It must be either i686 or x86_64."
echo
usage
exit 1
fi
[[ -r "$HOME/.config/pac-file.conf" ]] && source "$HOME/.config/pac-file.conf"
case $1 in
-S|--sync)
echo "Synchronising file cache \"$store\""
echo "with ${url}..."
echo
[[ -d "$store" ]] || mkdir -p "$store"
cd "$store"
for repo in ${repos[@]}
do
repo_filename="$repo.files.tar.gz"
repo_url=$url/$repo/os/$arch/$repo_filename
repo_file="$store/$repo_filename"
repo_dir="$store/$repo"
echo "$repo: Fetching from $repo_url"
rm -fr "$repo_file" "$repo_dir"
mkdir -p "$repo_dir"
wget -qO - $repo_url | tee "$repo_file" | ( cd "$repo_dir" ; gzip -cd | tar xf - )
done
echo "sync complete."
;;
-h|--help|-?)
usage
;;
*)
if [[ $# < 1 ]]; then
echo "Not enough parameters!"
echo
usage
exit 1
fi
if [[ ! -d "$store" ]]; then
echo "Local storage \"$store\" does not exist!"
echo "Did you already run \"$0\" --sync ?"
echo
usage
exit 1
fi
cd $store
grep -Re "$@" . | sed "s/\.\/\(.*\)\/files:/\1 /g"
;;
esac
exit 0
# EOF #
Thanks a lot!
Cheers,
Michael
Last edited by mschmarck (2008-06-13 06:50:13)
Offline
Good evening!
shining wrote:THAT is exactly, what I was looking for!
But sadly, the tool stopped working, because pierre no longer offers these package listings (or at least not at that URL :[ ).
Would somebody maybe know of a working alternative?
Thanks a lot,
Michael
Offline
http://www.archlinux.de/?page=Packages
Type the file you're interested in into the box ("Schlüsselwörter" = keywords). Select the "Datei" (file) radio button and hit "Suchen" (search). Unfortunately, it doesn't work with absolute path names.
Hope that helps.
Offline
I wrote a fairly decent tool called pkgfile to do exactly this. It's available in the pkgtools package on AUR. http://aur.archlinux.org/packages.php?ID=17941
[git] | [AURpkgs] | [arch-games]
Offline
Good evening!
mschmarck wrote:shining wrote:THAT is exactly, what I was looking for!
But sadly, the tool stopped working, because pierre no longer offers these package listings (or at least not at that URL :[ ).
Would somebody maybe know of a working alternative?
Thanks a lot,
Michael
Pierre no longer offer them because they are now on every mirrors, so that is even better.
At the moment, one tool was proposed on pacman-dev, for inclusion either in pacman or pacman-contrib packages, but nobody reviewed it seriously yet :
http://www.archlinux.org/pipermail/pacm … 12245.html
So help (for testing, reviewing, improving it) is welcome
Daenyth, if the tool you proposed is different, you should compare both to see what the differences are, and offer your opinion on pacman-dev ML.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
Hmm.. His script has a few ideas that mine doesn't, but mine offers more functionality. I'll work on adding the other things to mine.
[git] | [AURpkgs] | [arch-games]
Offline
The problem is, you're using the wrong distro
In Fedora 9:
$ yum provides /usr/bin/mutt
mutt.x86_64 : A text mode mail user agent
Offline
The problem is, you're using the wrong distro
In Fedora 9:
$ yum provides /usr/bin/mutt mutt.x86_64 : A text mode mail user agent
Now that's just downright mean.
Offline
http://www.archlinux.de/?page=Packages
Type the file you're interested in into the box ("Schlüsselwörter" = keywords). Select the "Datei" (file) radio button and hit "Suchen" (search). Unfortunately, it doesn't work with absolute path names.
Hope that helps.
Hm. Yes, this sort of works, thanks. But the results are hard to "parse". Eg. I searched for "dig" (as in /usr/bin/dig) and it of course found "dnsutils" all right, but I nearly missed that package in the huge list of returned packages. It would be nice if the resultlist would also show the hit directly. Eg. in the way PFL does.
But I suppose that package search is better than nothing
Thanks a lot, I really appreciated it!
Michael
Offline
Pierre no longer offer them because they are now on every mirrors, so that is even better.
True enough
At the moment, one tool was proposed on pacman-dev, for inclusion either in pacman or pacman-contrib packages, but nobody reviewed it seriously yet :
http://www.archlinux.org/pipermail/pacm … 12245.html
Great pointer!
So help (for testing, reviewing, improving it) is welcome
Will do so.
Thanks a lot,
Michael
Offline
Pages: 1