On Mon, Apr 23, 2001 at 11:45:08AM -0400, Albert den Haan wrote: > My question > ----------- > > The LSB has a MySQL data base of the files and commands that are part of a > compliant implementation. I hope to use this DB to autogenerate the > depends: list of the meta-package. > > However either I am missing something or this is a compute intensive job. > For example if I am searching for the package that contains the command > "tr" then I search for "dpkg --search bin/tr". But that gets me > $ dpkg -S bin/tr > xscreensaver: /usr/X11R6/bin/triangle > shellutils: /bin/true > textutils: /usr/bin/tr > traceroute: /usr/sbin/traceroute > ispell: /usr/bin/tryaffix > xscreensaver: /usr/X11R6/bin/truchet > groff: /usr/bin/troff > netbase: /usr/bin/tracepath6 > tree: /usr/bin/tree > netbase: /usr/bin/tracepath > netbase: /usr/bin/traceroute6 > transfig: /usr/X11R6/bin/transfig > tcpd: /usr/sbin/try-from > > AFICT dpkg --search does not honor $: > $ dpkg -S bin/tr\$ > dpkg: *bin/tr$* not found > > but grep does: > $ dpkg -S bin/tr | grep "bin/tr$" > textutils: /usr/bin/tr > > I can then use the same techniques as dpkg-shlibdeps (potato version :) to > find the package name and put that in my depends list. > > But, I have to repeat this for every bin/* and lib/* entity mandated in the > LSB DB. It takes a while. Is there a faster way? I've tried a few bulk > searches by asking dpkg -S to find more than one file but there are some > common prefixes in the LSB mandated commands too :(. ok, 1.) get debian/dists/potato/Contents-i386.gz from a debian mirror 2.) unzip it 3.) grep "bin/tr " Contents-i386.gz usr/bin/tr base/textutils 4.) repeat 3. grep is fast and you search in all debian packages and not only in the installed packages. > Also, how do I query for diverted entities like awk? Oh. this is IMHO a problem. Gruss Grisu -- Michael Bramer - a Debian Linux Developer http://www.debian.org PGP: finger grisu@db.debian.org -- Linux Sysadmin -- Use Debian Linux "Keine Shell, kein Prompt, keine Kekse." -- Jochen Hein in de.comp.os.linux.misc
Attachment:
pgp83HmaKDubn.pgp
Description: PGP signature