Subject: Re: finding a package name given a filename Date: Tue, Dec 08, 1998 at 10:41:24PM +0200
In reply to:Antti-Juhani Kaijanaho Quoting Antti-Juhani Kaijanaho([EMAIL PROTECTED]): > > On Sun, Nov 29, 1998 at 03:51:30PM -0500, [EMAIL PROTECTED] wrote: > > The problem with a lot of packages is that the executable is linked > > from a shorter name, and the links are not part of the package but are > > created in the postinst scripts. The xemacs example is a really good > > one. > > > > /usr/bin/xemacs -> /etc/alternatives/xemacs > > /etc/alternatives/xemacs -> /usr/bin/xemacs20 > > /usr/bin/xemacs20 -> /etc/alternatives/xemacs20 > > /etc/alternatives/xemacs20 -> /usr/bin/xemacs-20.4-nomule (finally!!!) > > > > So doing a 'dpkg -S /usr/bin/xemacs' would not work because > > /usr/bin/xemacs is actually not in the xemacs20-nomule package but is > > created after the package is extracted. > > I was thinking about this, tried to find a utility to chase a symbolic > link to a real file, but failed. I even asked if a local Unix guru > knew one. He didn't. > > So I wrote one. Here's a sample session with it: > > [EMAIL PROTECTED]:25:31]:~$ dpkg -S `chase /usr/bin/xemacs` > xemacs20-nomule: /usr/bin/xemacs-20.4-nomule > [EMAIL PROTECTED]:26:16]:~$ > > The `chase' here is my small utility. Basically it takes a file name > and finds the name of the real file it refers to, recursively > dereferencing all the symlinks it encounters. > > The source tarball (with a copy of GNU GPL and all the Autoconf bells > and whistles) is currently 28kB. If anyone is interested, I might > upload it somewhere (probably metalab aka sunsite), or even generate a > .deb of it (though I can't upload it to Debian yet, as I'm still > waiting for my developer status application to be fully processed). > > Is anyone interested enough to make an upload worthwhile at this > point? > Yes, I am. Any help on Debian(ese) would be appreciated! > > Antti-Juhani > -- > %%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%% > > About to generate a new signature, please wait... > > > -- > Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] < /dev/null > > -- "There is no reason for any individual to have a computer in their home." -- Ken Olson, President of DEC, World Future Society Convention, 1977 _______________________________________________________ Wayne T. Topa <[EMAIL PROTECTED]>