Re: [gentoo-user] Short cut for unmerging all packages that are not longer in the tree

2009-10-22 Thread Helmut Jarausch
Thanks to all of you for your help,
Helmut.

-- 
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany



Re: [gentoo-user] Short cut for unmerging all packages that are not longer in the tree

2009-10-22 Thread Neil Bothwick
On Thu, 22 Oct 2009 13:14:28 +0200 (CEST), Helmut Jarausch wrote:

> is there an easy way to unmerge all packages which are no longer in 
> the current portage tree.

eix-test-obsolete can produce a list of installed packages that are no
longer in portage.


-- 
Neil Bothwick

My brain's in gear, neutral's a gear ain't it?


signature.asc
Description: PGP signature


Re: [gentoo-user] Short cut for unmerging all packages that are not longer in the tree

2009-10-22 Thread Alan McKinnon
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 

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

-- 
alan dot mckinnon at gmail dot com



Re: [gentoo-user] Short cut for unmerging all packages that are not longer in the tree

2009-10-22 Thread Jesús Guerrero
On Thu, 22 Oct 2009 14:09:31 +0200, Alan McKinnon

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



Re: [gentoo-user] Short cut for unmerging all packages that are not longer in the tree

2009-10-22 Thread Alan McKinnon
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

-- 
alan dot mckinnon at gmail dot com



Re: [gentoo-user] Short cut for unmerging all packages that are not longer in the tree

2009-10-22 Thread Johannes Kimmel
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.

Johannes