public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alan McKinnon <alan.mckinnon@gmail.com>
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 16:13:29 +0200	[thread overview]
Message-ID: <200910221613.29734.alan.mckinnon@gmail.com> (raw)
In-Reply-To: <29ea6c787cd0c0abdcfcc661fbcda029@localhost>

On Thursday 22 October 2009 15:58:17 Jesús Guerrero wrote:
> > 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.
> 


The best place for this would be 

equery orphan <params>

or similar. I'm sure the maintainer will gratefully accept patches :-)

-- 
alan dot mckinnon at gmail dot com



  reply	other threads:[~2009-10-22 14:14 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
2009-10-22 14:13       ` Alan McKinnon [this message]
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=200910221613.29734.alan.mckinnon@gmail.com \
    --to=alan.mckinnon@gmail.com \
    --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