Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
re-emerge packages that were emerge on a date
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4433

PostPosted: Wed Sep 01, 2010 11:47 am    Post subject: re-emerge packages that were emerge on a date Reply with quote

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
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1569
Location: U.S.A.

PostPosted: Fri Sep 10, 2010 8:30 am    Post subject: Reply with quote

Thanks for recording it here. You'll save some poor droog hours of fumbling about.
_________________
"The accumulation of all power, legislative, executive, and judiciary in the same hands...may justly be pronounced the very definition of tyranny."
--James Madison, Federalist 46
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 5743
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Mon Sep 13, 2010 4:20 pm    Post subject: Reply with quote

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 ! :)
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.3.0-r2
2.6.37.2_plus_v1: BFS, CFS,THP,compaction, zcache or TOI
Hardcore Linux user since 2004 :D
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4433

PostPosted: Mon Sep 13, 2010 4:26 pm    Post subject: Reply with quote

ah thank you guys, warming my heart seeing that.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum