Circa 2002-Jul-11 11:48:51 +0100 dixit J. A. Landamore:
: I am a SPARC Solaris admin who has had the management of a few RH
: PCs dropped on him after a security scare, hence the naivity of this
: question. How do I find out which package provides a file? I've
: looked quickly at the documentation but all I can find is rpm -q
: --whatprovides <x>
--whatprovides queries the RPM database for package "capabilities",
i.e. for things that are listed by 'rpm --provides <packagename>'.
You want something different.
: This doesn't work if the source package isn't on the system. We did
: a minimal install and the user now wants another couple of packages
: added. Getting those packages is no problem, but they won't install
: because of dependancy problems. It appears that I need to
: interrogate the main RH site that contains all the packages, how do
: I do that?
If you have a Red Hat CD, or a local mirror of the packages somewhere,
you could do this
cd /blah/blah/blah/RedHat/RPMS
rpm -q --qf '[%{=NAME}-%{=VERSION}-%{=RELEASE}: %{FILENAMES}\n]' \
*.rpm |grep <filename>
If think you might ever do this more than once (or even be reincarnated
and then have to do it again) you ought to:
cd
cat <<'EOF' >>.popt
rpm alias --files --qf '[%{=NAME}-%{=VERSION}-%{=RELEASE}:%{FILENAMES}\n]'
EOF
Then you can do:
cd /blah/blah/blah/RedHat/RPMS
rpm -q --files *.rpm |grep <filename>
--jim
--
jim knoble | jmknoble@pobox.com | http://www.pobox.com/~jmknoble/
(GnuPG fingerprint: 31C4:8AAC:F24E:A70C:4000::BBF4:289F:EAA8:1381:1491)
Attachment:
pgp00005.pgp
Description: PGP signature