# re-emerge packages that were emerge on a date

## krinn

It's not really useful, only some users might need it for a special purpose (usage is too uncommon)

I use it to revert my packages build against a newer glibc version after i didn't catch a glibc upgrade was in my -uDN world list (and i don't want to -e world for just the few packages that were build with it)

This might be useful for people that use automatic update script. Or build pkg for packages that were emerge without -b options by that time. Or a cflags player that change his mind...

Anyway, as i said, uncommon usage, just a low tip except for the weirdo that keep experimenting with portage.

Now that you get the picture, re-emerge all the packages that were emerge on a fixed date

See the commands list first (for the wises who check before doing havoc)

genlop -l --date 08/31/2010 --date 09/01/2010 -n | grep "*" -v | sed 's/[a-zA-Z0-9].*>>> /=/' | uniq | xargs -I {} echo  emerge -1 {}

really re-emerge them

genlop -l --date 08/31/2010 --date 09/01/2010 -n | grep "*" -v | sed 's/[a-zA-Z0-9].*>>> /=/' | uniq | xargs -I {} emerge -1 {}

note1: need emerge log feature & genlop (in portage)

note2: thanks to genlop you can use date range as --date 10 days ago --date now ... check genlop manual

note3: as you seen, emerge is run package by package, slower than emerging all packages at once (--jobs & parallelism users will loose the feature), but it's to avoid two programs with different version emerge at that date that would make emerge complaining about slot conflicts.

ie: on same date, emerge openssh-5.4 and openssh-5.5 would end up with "emerge =openssh-5.5 =openssh5.4" = slots conflict

this way you'll get "emerge =openssh5.5 && emerge =openssh5.4"

- You can use the xargs -P to run multi-emerge at once as (4 emerge in that example)

genlop -l --date 08/31/2010 --date 09/01/2010 -n | grep "*" -v | sed 's/[a-zA-Z0-9].*>>> /=/' | uniq | xargs -P 4 -I {} emerge -1 {}

- Or if you know it's not your case you can use that "i have no slot conflict" version instead :

see: genlop -l --date 08/31/2010 --date 09/01/2010 -n | grep "*" -v | sed 's/[a-zA-Z0-9].*>>> /=/' | uniq | xargs emerge -pv

run: genlop -l --date 08/31/2010 --date 09/01/2010 -n | grep "*" -v | sed 's/[a-zA-Z0-9].*>>> /=/' | uniq | xargs emerge -1

----------

## Bones McCracker

Thanks for recording it here.   You'll save some poor droog hours of fumbling about.

----------

## kernelOfTruth

 *BoneKracker wrote:*   

> Thanks for recording it here.   You'll save some poor droog hours of fumbling about.

 

definitely !

from time to time I need to switch to the vanilla compiler and simply forgot to switch back

this might come very very handy in those situations when I got to emerge a certain set of packages 

thanks !   :Smile: 

----------

## krinn

ah thank you guys, warming my heart seeing that.

----------

