Issue
Ref. existing question How to list the contents of a package using YUM? and its answers.
As shown below, repoquery (from yum-utils package) gives no output for a package even though the package is installed. In fact, the package in question is yum-utils, from whence repoquery came! (Though note that it also gives no output for other packages - an example is shown.)
Does anybody know why this is happening? Has anybody else had the same problem?
Problem is as follows...
The repoquery command from the yum-utils package doesn't appear to work as intended. See below. yum-utils package was installed, repoquery command could then be used but it does not list the contents of the package it came from, although it does list contents for another package which I chose at random.
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ re
read readonly regdbdump reset restorecon
readarray readprofile reload resize2fs restorecond
readelf reboot rename resizecons return
readlink refer renice restart rev
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ sudo yum install yum-utils
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.30-30.el6 will be installed
--> Processing Dependency: yum >= 3.2.29-56 for package: yum-utils-1.1.30-30.el6 .noarch
--> Running transaction check
---> Package yum.noarch 0:3.2.29-22.el6 will be updated
---> Package yum.noarch 0:3.2.29-60.el6 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
yum-utils noarch 1.1.30-30.el6 rhel-x86_64-server-6 110 k
Updating for dependencies:
yum noarch 3.2.29-60.el6 rhel-x86_64-server-6 1.0 M
Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 1 Package(s)
Total download size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): yum-3.2.29-60.el6.noarch.rpm | 1.0 MB 00:00
(2/2): yum-utils-1.1.30-30.el6.noarch.rpm | 110 kB 00:00
--------------------------------------------------------------------------------
Total 619 kB/s | 1.1 MB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : yum-3.2.29-60.el6.noarch 1/3
Installing : yum-utils-1.1.30-30.el6.noarch 2/3
Cleanup : yum-3.2.29-22.el6.noarch 3/3
Installed products updated.
Installed:
yum-utils.noarch 0:1.1.30-30.el6
Dependency Updated:
yum.noarch 0:3.2.29-60.el6
Complete!
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ repo
repoclosure repo-graph repoquery reposync
repodiff repomanage repo-rss repotrack
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ sudo repoquery --list freeradius
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ sudo repoquery --list yum-utils # NOTE NO OUTPUT HERE
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ sudo rpm -qa | head
[sudo] password for jgilmartin:
ruby-libs-1.8.7.352-10.el6_4.x86_64
basesystem-10.0-4.el6.noarch
ruby-shadow-1.4.1-13.el6.x86_64
openssh-clients-5.3p1-94.el6.x86_64
s3cmd-1.0.1-1.el6.noarch
info-4.13a-8.el6.x86_64
procmail-3.22-25.1.el6.x86_64
libcom_err-1.41.12-11.el6.x86_64
dbus-1.2.24-7.el6_3.x86_64
libsepol-2.0.41-4.el6.x86_64
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ sudo repoquery --list s3cmd | head # WORKS FOR THIS PACKAGE
/usr/bin/s3cmd
/usr/lib/python2.6/site-packages/S3/ACL.py
/usr/lib/python2.6/site-packages/S3/ACL.pyc
/usr/lib/python2.6/site-packages/S3/AccessLog.py
/usr/lib/python2.6/site-packages/S3/AccessLog.pyc
/usr/lib/python2.6/site-packages/S3/BidirMap.py
/usr/lib/python2.6/site-packages/S3/BidirMap.pyc
/usr/lib/python2.6/site-packages/S3/CloudFront.py
/usr/lib/python2.6/site-packages/S3/CloudFront.pyc
/usr/lib/python2.6/site-packages/S3/Config.py
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ sudo rpm -ql yum-utils | head # rpm -ql WORKS FOR THE PACKAGE
/etc/bash_completion.d
/etc/bash_completion.d/yum-utils.bash
/usr/bin/debuginfo-install
/usr/bin/find-repos-of-install
/usr/bin/needs-restarting
/usr/bin/package-cleanup
/usr/bin/repo-graph
/usr/bin/repo-rss
/usr/bin/repoclosure
/usr/bin/repodiff
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ uname -a
Linux cnmvlmtlb01 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
(DEV) [jgilmartin@cnmvlmtlb01 ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.2 (Santiago)
(DEV) [jgilmartin@cnmvlmtlb01 ~]$
Solution
I came across this problem and resolved it by adding the option --pkgnarrow=installed
.
I suspect repoquery is a little buggy in this regard. I found that some packages would appear even if they were installed, while others would not, unless I added the pkgnarrow option.
You could also use --pkgnarrow=all
.
Example:
$ sudo repoquery --repoid ix-stable boost
$ sudo repoquery --repoid ix-stable --pkgnarrow=all boost
boost-0:1.41.0-17.el6_4.x86_64
Answered By - harmic Answer Checked By - Katrina (WPSolving Volunteer)