View previous topic :: View next topic |
Author |
Message |
Tekel n00b
Joined: 16 Dec 2005 Posts: 72 Location: Philadelphia PA
|
Posted: Fri Feb 29, 2008 12:15 pm Post subject: Easy manual digest of multiple ebuilds |
|
|
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 |
|
|
AllenJB Veteran
Joined: 02 Sep 2005 Posts: 1285
|
Posted: Fri Feb 29, 2008 1:37 pm Post subject: |
|
|
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 |
|
|
nbensa l33t
Joined: 10 Jul 2002 Posts: 799 Location: Buenos Aires, Argentina
|
Posted: Fri Feb 29, 2008 2:01 pm Post subject: |
|
|
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 |
|
|
Tekel n00b
Joined: 16 Dec 2005 Posts: 72 Location: Philadelphia PA
|
Posted: Fri Feb 29, 2008 2:22 pm Post subject: |
|
|
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 |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Fri Feb 29, 2008 2:32 pm Post subject: |
|
|
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 |
|
|
Tekel n00b
Joined: 16 Dec 2005 Posts: 72 Location: Philadelphia PA
|
Posted: Fri Feb 29, 2008 3:20 pm Post subject: |
|
|
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 |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Fri Feb 29, 2008 3:25 pm Post subject: |
|
|
Tekel wrote: | If by officially supported fix, you meant something that didn't work for me, .... | 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 |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
|
Back to top |
|
|
|