Friday, April 28, 2006

Package Mayhem

Today I found a little bug in gnome-about-me, the application used to set all personal data of a user (Name, Address, etc). I didn't find a package on launchpad that said gnome-about-me, so I posted it under gnome-desktop.
And as you can read in the comments on the bugreport I got a wonderful tip I found valuable enough to blog about ;)

Sebastien Bacher:
Thanks for your bug. About the right package:
$ dpkg -S gnome-about-me
gnome-control-center: /usr/bin/gnome-about-me

Type "dpgk -S " followed by a binary name, and you will get the name of the package containing it.

Simply Great.

Update: Read the comments for some really useful tips by "Anonymous".


Anonymous said...

Even greater: it works for any file in a package, not just binaries. And you can give it wildcards as well.

There's also dpkg -L packagename which lists all files from the given package.

lgespee said...

Can't believe I ever lived without this knowlidge ;)

Thanks for the tip (whoever you are).

Anonymous said...

But wait, there's more!

sudo apt-get install apt-file
sudo apt-file update

Now you can search for files NOT installed on your system, to find out which package you have to install in case something is missing. Like so:

apt-file search [file]

Also you can list files in any package with:

apt-file list [package]

lgespee said...

Well now that is useful stuff.
Thanks again for posting these comments.
(I also added an update text to the original post to link to your comments.)