LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   dpkg (https://www.linuxquestions.org/questions/linux-distributions-5/dpkg-59531/)

rch 05-13-2003 04:41 AM

dpkg
 
What would be the equivalent of rpm -q --whatprovides blah
in debian systems?

markus1982 05-13-2003 03:30 PM

rpm -qa is like dpkg --list or what exactly are you looking for ? Information about a package? dpkg -p <packagename> ... just man dpkg :-)

rch 05-14-2003 01:09 AM

Quote:

Originally posted by markus1982
rpm -qa is like dpkg --list or what exactly are you looking for ? Information about a package? dpkg -p <packagename> ... just man dpkg :-)
First I know about dpkg -p and I am not that stupid not to read the man page before coming here.
In rpm we have a option
rpm -q --whatprovides which gives the package name which provides a particular utility
ex:
rpm -q --whatprovides /sbin/init
returns SysVinit-2.78
so that next time round I can try
rpm -q SysVinit
or rpm -qil SysVinit
I was just wondering whether thereis something similiar in debian systems with dpkg

2damncommon 05-14-2003 08:02 AM

This isn't a 'dpkg' command, but:

apt-cache showpkg "packagename"

displays package info.

Good Luck

markus1982 05-14-2003 01:11 PM

apt-file is what you are after. and i did not assume you are stupid or didn't quickly check the man pages. take a look at apt-file package information.

Quote:

apt-file is a command line tool for searching packages for the APT packaging system.

Unlike apt-cache, you can search in which package a file is included or list the contents of a package without installing or fetching it.

rch 05-15-2003 03:54 AM

Quote:

Originally posted by markus1982
apt-file is what you are after. and i did not assume you are stupid or didn't quickly check the man pages. take a look at apt-file package information.
Thanks
This is what I was looking for.

rch 05-15-2003 08:25 AM

I was going through the man pages again.
apt-file would work for those packages which are not installed.
With dpkg I got this
dpkg -S /sbin/init
returned sysvinit
now i did
dpkg -p sysvinit
now
dpkg -L sysvinit
returned all the files that were installed from sysvinit
thus it worked like
rpm -q --whatprovides /sbin/init
and
rpm -qil SysVinit
Anyway thanks for your help
I must be getting more dumber every moment(I "read" the man pages but missed this information)


All times are GMT -5. The time now is 07:52 PM.