From: "Bo Ørsted Andresen" <bo.andresen@zlin.dk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Package dependencies
Date: Wed, 11 Oct 2006 12:09:40 +0200 [thread overview]
Message-ID: <200610111209.44850.bo.andresen@zlin.dk> (raw)
In-Reply-To: <200610110847.23567.bo.andresen@zlin.dk>
[-- Attachment #1: Type: text/plain, Size: 1707 bytes --]
On Wednesday 11 October 2006 08:47, Bo Ørsted Andresen wrote:
[SNIP]
> Yes, that's reverse dependencies.
>
> The portage way is to see if it shows up on emerge --depclean --pretend. If
> it doesn't then you have something in your world file that depends on it.
> If the package itself is in your world file then the best solution is to
> simply remove it manually by editing /var/lib/portage/world and then run
> --depclean to see if anything keeps it...
So played a bit.. ;) I think the easiest (in terms of performance) way to get
a complete list of all installed, deep reverse depencies of a package is to
install sys-apps/pkgcore and use this bash script (at least it seems to work
for me):
---------------------------------------------------------------------
!/bin/bash
ATOM=$1
REV=$(pquery --vdb --revdep ${ATOM})
while [[ -n ${REV} ]];
do
REV_OLD="$REV"
REV=$(echo "${REV_OLD}" | \
while read pkg_rev;
do
pkg=$(echo "$pkg_rev" | sed -r 's/-[^-]+(-r[0-9]+)*$//');
if [[ ! $ALL_REV =~ "$pkg" ]];
then
pquery --vdb --revdep "$pkg";
fi ;
done)
ALL_REV="$ALL_REV
$REV_OLD"
done
echo "$ALL_REV" | sort -u
---------------------------------------------------------------------
E.g. to find installed, deep reverse dependencies of ssmtp (which I happen to
have installed):
# ./above_bash_script mail-mta/ssmtp
Note that you need a fully qualified atom (such as mail-mta/ssmtp) as
argument. (A couple of places in the script altering quotation or indentation
will influence the output). Note also that it may take a while to run...
--
Bo Andresen
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-10-11 10:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-11 4:13 [gentoo-user] Package dependencies Anthony E. Caudel
2006-10-11 5:01 ` Bo Ørsted Andresen
2006-10-11 6:26 ` Anthony E. Caudel
2006-10-11 6:47 ` Bo Ørsted Andresen
2006-10-11 10:09 ` Bo Ørsted Andresen [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-02-16 18:59 [gentoo-user] package dependencies Nick Smith
2006-02-16 19:13 ` Ghaith Hachem
2006-02-16 19:33 ` Nick Smith
2006-02-16 19:40 ` Daniel da Veiga
2006-02-16 19:13 ` gentuxx
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200610111209.44850.bo.andresen@zlin.dk \
--to=bo.andresen@zlin.dk \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox