[CentOS] Trying to find packages that depend on package X.

Fri May 26 16:57:42 UTC 2006
Rodrigo Barbosa <rodrigob at suespammers.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, May 26, 2006 at 12:35:40PM -0400, William L. Maltby wrote:
> Quick search in bout "man yum" and "man rpm" shows how to find what
> package X depends upon, but not what depends upon package X. Of course,
> we could get a deplist for everything but I'm *guessing* that take more
> overhead and grep too.
> 
> "yum remove" tells us. Then we just have to remember to say "No, don't
> remove". Am I missing something... like I missed that big Google box on
> the archives?
> 
> Anyway, if I haven't overlooked something, I was thinking that this
> might be a good enhancement request for yum's buglist. Do like remove
> but skip making us reliably answer "no".
> 
> OK. Did I miss something? Is this a feature that others would find
> handy? Should I get it on a yum bug list?

Just needs a little magic:

rpm -q --provides PACKAGE_NAME | sed 's/^/"/;s/\([^[:space:]]\) *$/\1"/' | xargs rpm -q --whatrequires | grep -v -E '^no package'

ex:
rpm -q --provides exim | sed 's/^/"/;s/\([^[:space:]]\) *$/\1"/' | xargs rpm -q --whatrequires | grep -v -E '^no package'

[]s

- -- 
Rodrigo Barbosa <rodrigob at suespammers.org>
"Quid quid Latine dictum sit, altum viditur"
"Be excellent to each other ..." - Bill & Ted (Wyld Stallyns)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFEdzOGpdyWzQ5b5ckRAv/sAKCjYtnIMB4Qm71SIKh172SjYRps5ACfdaqB
MpTD51Vg8P2P+UWP+I9BdXE=
=qOTv
-----END PGP SIGNATURE-----