Gentoo Archives: gentoo-amd64

From: "Dustin C. Hatch" <admiralnemo@××××××.com>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: GCC upgrade script
Date: Wed, 25 Apr 2007 12:05:49
Message-Id: 462F43A6.9060404@dchweb.com
In Reply to: [gentoo-amd64] Re: GCC upgrade script by Duncan <1i5t5.duncan@cox.net>
1 If you don't want the versions, as Duncan wrote, I would suggest that
2 you use eix. eix -I will provide a pretty-printed list of all the
3 packages installed on your system. Read its man page to find out how to
4 do custom formatting. You can have it print just the package name, the
5 category and package names, versions, use flags, etc. Once you get a
6 feel for its syntax, you shouldn't have any trouble getting the
7 information you need.
8
9 Be careful, though, to run update-eix before doing anything because eix
10 uses an index database, not the actual portage tree or data. If you
11 make any changes to your system, eix will not know it until you run
12 update-eix.
13
14 Dustin C. Hatch
15 http://www.dchweb.com
16
17
18
19 Duncan wrote:
20 > "Mark Haney" <mhaney@××××××××××××.org> posted
21 > 462E2157.5050606@××××××××××××.org, excerpted below, on Tue, 24 Apr 2007
22 > 11:25:11 -0400:
23 >
24 >
25 >> A while back, someone posted a command that I think pulled all the info
26 >> from 'emerge -eav world' into a nice neat package so that a GCC upgrade
27 >> can be done in smaller increments. Now, however, I can't seem to find
28 >> it in the archives, or in my stored list backup. Can someone throw me a
29 >> copy of that post or point me to the right one online?
30 >>
31 >
32 > emerge -pe world|grep /|cut -f2 -d"]"|sed "s/^ /=/"
33 >
34 > That'll give you a list of packages, with the versions, preceded by "="
35 > for each one, so emerge will give you exactly the same versions. You can
36 > redirect it to a file as necessary.
37 >
38 > If you want it without versions, so as to emerge the latest, it gets
39 > somewhat hairier, because the version strings are somewhat difficult to
40 > automatically delete without error. I usually just take the lazy way
41 > out, replacing that sed above with another cut, as so:
42 >
43 > emerge -pe world|grep /|cut -f2 -d"]"|cut -f2 -d" "
44 >
45 > That still leaves the versions. Then I open the redirect file in my
46 > favorite editor and use search and replace with prompt, playing with the
47 > search pattern and repeating until I get what I want. A regex pattern of
48 > -[-abcr.0-9]*$, replaced with <nothing> gets most of it, but leaves
49 > strings such as -alpha and -beta, which are easy enough to remove on
50 > either further searches or manually. Of course, it's possible to include
51 > those in the regex search pattern as well, and would be possible to then
52 > make that a sed command, but it's difficult to get exactly right, then
53 > remember, and easy enough to do in a decent editor, so that's what I do.
54 >
55 >

Replies

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