Checking package dependencies (up and down)
Today I was woking on updating one of the packages we maintain on our internal repos, and I was not sure exacly which packages required the one I was rebuilding. I had to check that, otherwise something could break if I did a mistake, and the best thing is to pre-check as much as possible.
So reading them Yum man page, I found the option “deplist”, which shows me all the packages which are required by a given package.
# yum deplist libsndfile
package: libsndfile.i386 1.0.17-6.fc10
provider: glibc.i386 2.9-2
provider: glibc.i686 2.9-2
provider: glibc.i686 2.9-3
provider: glibc.i386 2.9-3
provider: libogg.i386 2:1.1.3-9.fc9
Ok, that’s one part of the problem. But what would really impact this update would be any broken dependencies up, i.e. who depends on this given package.
The nice guys on #yum@freenode pointed me to pkg-provs-tree-view.py, which does exactly what I need.
# python pkg-provs-tree-view.py libsndfile
libsndfile-1.0.17-6.fc10.i386 [cmd line]
\_ Io-language-graphics-and-sound-20071010-6.fc10.i386 [2: libsndfile.so.1, libsndfile.so.1(libsndfile.so.1.0)]
\_ armstrong-0.2.6-6.fc10.i386 [2: libsndfile.so.1, libsndfile.so.1(libsndfile.so.1.0)]
| \_ armstrong-devel-0.2.6-6.fc10.i386 [3: armstrong = 0.2.6-6.fc10, liblunarstd.so.0, libzzub.so.0]
| \_ pyzzub-0.2.6-6.fc10.i386 [1: armstrong = 0.2.6-6.fc10]
| | \_ aldrin-0.13-1.fc10.noarch [1: pyzzub = 0.2.6-6.fc10]
And the best part is that it searches for any dependencies installed or not installed. This is way better than “rpm -q –whatrequires”. 😀