sobota, 4 września 2010

Fedora: Package utilities - yum-utils

Using Fedora I encountered a problem, namely how to check which list files that belong to a specific package, how to check the package for a specific file from the filesystem, get the installation date of a package etc. (all these functionalities I found very useful while I was using Solaris operating system). The plain yum utility of Fedora seems to be very limited in that area but fortunately Fedora provides its extentions in the package called yum-utils, which can be installed as follows:

#yum install yum-utils

I did not have the opportunity to use all the utilities that come with this package but one that was extremely useful for me is called repoquery. Utility queries the YUM repositories in a similar way that the rpm does that. The example how to list the file for a specific package is presented below:

# repoquery -la yum-utils
/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
/usr/bin/repomanage
/usr/bin/repoquery
...
/usr/share/man/man8/yum-complete-transaction.8.gz
/usr/share/man/man8/yumdb.8.gz
#

The same utility cane be used also to check the name of the package for a specific file (one remark here -> the location with symbolic links did not work in my case):

#repoquery -af /etc/rc.d/init.d/rpcbind
rpcbind-0:0.2.0-5.fc13.i686
rpcbind-0:0.2.0-4.fc12.i686

For more options you can check the manual. So far I have not found any other way to display the installation date of a package than using the rpm:

# rpm -qa --last
...
# rpm -qa --last grep rpcbind
rpcbind-0.2.0-5.fc13 Sat 04 Sep 2010 05:01:39 PM CEST

Brak komentarzy:

Prześlij komentarz