Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: GCC upgrade script
Date: Wed, 25 Apr 2007 09:11:10
Message-Id: pan.2007.04.25.09.07.46@cox.net
In Reply to: [gentoo-amd64] GCC upgrade script by Mark Haney
1 "Mark Haney" <mhaney@××××××××××××.org> posted
2 462E2157.5050606@××××××××××××.org, excerpted below, on Tue, 24 Apr 2007
3 11:25:11 -0400:
4
5 > A while back, someone posted a command that I think pulled all the info
6 > from 'emerge -eav world' into a nice neat package so that a GCC upgrade
7 > can be done in smaller increments. Now, however, I can't seem to find
8 > it in the archives, or in my stored list backup. Can someone throw me a
9 > copy of that post or point me to the right one online?
10
11 emerge -pe world|grep /|cut -f2 -d"]"|sed "s/^ /=/"
12
13 That'll give you a list of packages, with the versions, preceded by "="
14 for each one, so emerge will give you exactly the same versions. You can
15 redirect it to a file as necessary.
16
17 If you want it without versions, so as to emerge the latest, it gets
18 somewhat hairier, because the version strings are somewhat difficult to
19 automatically delete without error. I usually just take the lazy way
20 out, replacing that sed above with another cut, as so:
21
22 emerge -pe world|grep /|cut -f2 -d"]"|cut -f2 -d" "
23
24 That still leaves the versions. Then I open the redirect file in my
25 favorite editor and use search and replace with prompt, playing with the
26 search pattern and repeating until I get what I want. A regex pattern of
27 -[-abcr.0-9]*$, replaced with <nothing> gets most of it, but leaves
28 strings such as -alpha and -beta, which are easy enough to remove on
29 either further searches or manually. Of course, it's possible to include
30 those in the regex search pattern as well, and would be possible to then
31 make that a sed command, but it's difficult to get exactly right, then
32 remember, and easy enough to do in a decent editor, so that's what I do.
33
34 --
35 Duncan - List replies preferred. No HTML msgs.
36 "Every nonfree program has a lord, a master --
37 and if you use the program, he is your master." Richard Stallman
38
39 --
40 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] Re: GCC upgrade script "Dustin C. Hatch" <admiralnemo@××××××.com>
Re: [gentoo-amd64] Re: GCC upgrade script "Bo Ørsted Andresen" <bo.andresen@××××.dk>