From: "Jesús Guerrero" <i92guboj@terra.es>
To: <gentoo-user@lists.gentoo.org>
Subject: Re: [gentoo-user] Short cut for unmerging all packages that are not longer in the tree
Date: Thu, 22 Oct 2009 15:58:17 +0200 [thread overview]
Message-ID: <29ea6c787cd0c0abdcfcc661fbcda029@localhost> (raw)
In-Reply-To: <200910221409.31169.alan.mckinnon@gmail.com>
On Thu, 22 Oct 2009 14:09:31 +0200, Alan McKinnon
<alan.mckinnon@gmail.com>
wrote:
> On Thursday 22 October 2009 15:42:41 Johannes Kimmel wrote:
>> Helmut Jarausch wrote:
>> > Hi,
>> >
>> > is there an easy way to unmerge all packages which are no longer in
>> > the current portage tree.
>> > (Those make problems on update world)
>> >
>> > Many thanks for a hint,
>> > Helmut.
>>
>> if packages are not in the portage tree, they should not be pulled in
>> anymore. therefore "emerge --depclean" could help.
>
> depclean only removes packages that it knows for a fact are no longer
> needed.
> This means
>
> - not in world
> - not linked to by anything
> - not depended on by anything
>
> "not in the tree" is not part of that list. If you have a package in
world
> that is not in the tree anymore, depclean will leave it as is. It will
> remove
> ancient mere deps that are somehow still lying around though
Yep, if the package is in world, delclean will not help.
You could always do it the bash way. I have no idea if there's any tool
out there that will make this easier, but it's simple enough to script it,
something like this should work:
qlist -I --nocolor | while read pkg; do
if [ ! -d "/var/portage/$pkg" ]; then
echo "$pkg is not in portage"
fi
done
This will not catch overlays, but it could be easily extended to do so,
it's just a generic (and untested) example. It should work I guess. It just
dumps the list of installed packages, then tries to find a dir with the
same name under your portage directory and if it doesn't exist then the
package name is printed.
--
Jesús Guerrero
next prev parent reply other threads:[~2009-10-22 13:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-22 11:14 [gentoo-user] Short cut for unmerging all packages that are not longer in the tree Helmut Jarausch
2009-10-22 13:42 ` Johannes Kimmel
2009-10-22 12:09 ` Alan McKinnon
2009-10-22 13:58 ` Jesús Guerrero [this message]
2009-10-22 14:13 ` Alan McKinnon
2009-10-22 14:05 ` [gentoo-user] " Nikos Chantziaras
2009-10-22 14:16 ` [gentoo-user] " Neil Bothwick
2009-10-22 14:39 ` Helmut Jarausch
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=29ea6c787cd0c0abdcfcc661fbcda029@localhost \
--to=i92guboj@terra.es \
--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