2012/9/8 Neil Bothwick <firstname.lastname@example.org>
On Fri, 07 Sep 2012 23:14:05 +0200, Michael Hampicke wrote:
> >> genlop -ul | grep 'sys-devel/gcc-[0-9]'
> > And this week's prize for unnecessary use of pipes and grep goes to...
> > genlop -u sys-devel/gcc
> Nope, we not only need the time when gcc was unmerged (-u), but also
> when it was merged (-l). When there's little time difference between
> merge and unmerge we can assume, that portage auto-cleaned the old
> version of gcc. If you combine -u and -l you need to grep (to be exact
> sys-devel/gcc-[0-9], because of sys-devel/gcc-config and
genlop, unlike qlop, does exact matching by default, so gcc mtches only
gcc, not gcc-config (use -s if you want that). When you give a package
name all merges are shown by default (-l is to show the full
history), so the command I gave does what you want, like this
* * *Thu Jun 21 01:45:05 2012 <<< sys-devel/gcc-4.5.3-r2
* * *Thu Jun 21 01:45:33 2012 >>> sys-devel/gcc-4.5.3-r2
* * *Mon Jul 16 10:30:01 2012 <<< sys-devel/gcc-4.5.3-r2
* * *Mon Jul 16 10:30:32 2012 >>> sys-devel/gcc-4.5.4
* * *Thu Sep *6 11:24:27 2012 <<< sys-devel/gcc-4.6.3
* * *Thu Sep *6 11:24:45 2012 >>> sys-devel/gcc-4.6.3
* * *Thu Sep *6 11:26:15 2012 <<< sys-devel/gcc-4.5.4
* * *Thu Sep *6 11:26:43 2012 >>> sys-devel/gcc-4.5.4
Except it is coloured by default when outputting to a terminal, merges in
green, unmerges in red. Using -l and then grep is saying "show me
everything, oh no, cut out anything that's not gcc" rather than "show me
all gcc merges and unmerges".
I tried your command before answering you - so I don't look like a fool
And I am 100% certain that genlop -u <package> only showed unmerges when I tested it on my workstation (that's the reason I added -l | grep). However, just now I tested it again on my notebook, and it works like you described it (and like how you would expect it to work). Have to try it again on my WS on monday.
Anyhoo, my point was to show the OP how he could check for himself that portage always unmerges older packages when upgrading to newer versions in the same slot - and for that, both solutions work.
Going to bed now