Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Easy manual digest of multiple ebuilds
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
Tekel
n00b
n00b


Joined: 16 Dec 2005
Posts: 72
Location: Philadelphia PA

PostPosted: Fri Feb 29, 2008 12:15 pm    Post subject: Easy manual digest of multiple ebuilds Reply with quote

A One line sed powered command to rebuild the digest of all ebuilds required for the building of a package

Change to directory /usr/portage

then

Code:

emerge -pv portage | sed -e 's/\[.*\ \]\ \([^\/]*\)\/\([^-]*\?\)-\([^\ ]*\).*/\1\/\2\/\2-\3.ebuild/g' | xargs -i'{}' ebuild '{}' digest
Back to top
View user's profile Send private message
AllenJB
Veteran
Veteran


Joined: 02 Sep 2005
Posts: 1285

PostPosted: Fri Feb 29, 2008 1:37 pm    Post subject: Reply with quote

Excellent idea! Let's redigest every package before installing it so that now all your packages accept the checksums of the rootkit-riddled downloads from the hacked mirror you're using.

Checksums exist for a reason. Don't treat digest failures lightly.
Back to top
View user's profile Send private message
nbensa
l33t
l33t


Joined: 10 Jul 2002
Posts: 799
Location: Buenos Aires, Argentina

PostPosted: Fri Feb 29, 2008 2:01 pm    Post subject: Reply with quote

you don't have your own overlay, do you?

don't be so short minded. i used to maintain my own kde tree, and every time I've to upgrade it was a real pain. I've ended up coding my own python script which generated the digest files for me.

if you use _only_ the official repository, then, this one-liner is not for you. for everyone else, it's almost perfect.
Back to top
View user's profile Send private message
Tekel
n00b
n00b


Joined: 16 Dec 2005
Posts: 72
Location: Philadelphia PA

PostPosted: Fri Feb 29, 2008 2:22 pm    Post subject: Reply with quote

After trying to upgrade from portage 2.0.x to portage 2.1.x I kept getting all sorts of digest errors on the packages, This has happended multiple times so i have finally put together a quick SED script ( it needs to be cleaned up a little ) but it saves me from having 32 packages that need to be manually re digested due to the new manifest files.

The real trick however is the isolation of \1 \2 \3 so now its trivial to do all sorts of bad things like have portage automatically populate my packages.keywords file

Code:

ACCEPT_KEYWORDS=~x86 emerge -pv #SOME MASKED PACAKGE# | sed -e 's/\[.*\ \]\ \([^\/]*\)\/\([^-]*\?\)-\([^\ ]*\).*/=\1\/\2-\3/g' >> /etc/portage/package.keywords


useful for things like upgrading to the newest gnome for instance.
is this behavious reccomended: no
is it perfectly clean: no
will it save me time : yes
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2719
Location: here, there or in transit

PostPosted: Fri Feb 29, 2008 2:32 pm    Post subject: Reply with quote

Tekel wrote:
After trying to upgrade from portage 2.0.x to portage 2.1.x I kept getting all sorts of digest errors on the packages, This has happended multiple times so i have finally put together a quick SED script ... it saves me from having 32 packages that need to be manually re digested due to the new manifest files.
There was an official supported fix for this, referenced by the news announcement of the final implementation of GLEP 44.
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
Tekel
n00b
n00b


Joined: 16 Dec 2005
Posts: 72
Location: Philadelphia PA

PostPosted: Fri Feb 29, 2008 3:20 pm    Post subject: Reply with quote

timeBandit wrote:
Tekel wrote:
After trying to upgrade from portage 2.0.x to portage 2.1.x I kept getting all sorts of digest errors on the packages, This has happended multiple times so i have finally put together a quick SED script ... it saves me from having 32 packages that need to be manually re digested due to the new manifest files.
There was an official supported fix for this, referenced by the news announcement of the final implementation of GLEP 44.


If by officially supported fix, you meant something that didn't work for me, then I already knew about it, and it didn't work for me. The re digesting was done after the manifest221 script was ran.
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2719
Location: here, there or in transit

PostPosted: Fri Feb 29, 2008 3:25 pm    Post subject: Reply with quote

Tekel wrote:
If by officially supported fix, you meant something that didn't work for me, ....
:lol: Well put.
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Fri Feb 29, 2008 5:21 pm    Post subject: Reply with quote

I just recursively deleted all of the digest files from my overlay and all was well.
_________________
John

My gentoo overlay
Instructons for overlay
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