From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.62) (envelope-from ) id 1HggFo-0006I7-Rb for garchives@archives.gentoo.org; Wed, 25 Apr 2007 12:05:49 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l3PC3vwb024148; Wed, 25 Apr 2007 12:03:57 GMT Received: from mail.arcplasma.com (ares.arcplasma.com [69.149.97.13]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l3PC3uNV024137 for ; Wed, 25 Apr 2007 12:03:56 GMT Received: from [67.52.230.124] (rrcs-67-52-230-124.west.biz.rr.com [67.52.230.124]) by mail.arcplasma.com (Postfix) with ESMTP id 2D66D17C273 for ; Wed, 25 Apr 2007 07:03:51 -0500 (CDT) Message-ID: <462F43A6.9060404@dchweb.com> Date: Wed, 25 Apr 2007 07:03:50 -0500 From: "Dustin C. Hatch" User-Agent: Thunderbird 2.0.0.0 (X11/20070420) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-amd64@gentoo.org Reply-to: gentoo-amd64@lists.gentoo.org MIME-Version: 1.0 To: gentoo-amd64@lists.gentoo.org Subject: Re: [gentoo-amd64] Re: GCC upgrade script References: <462E2157.5050606@ercbroadband.org> In-Reply-To: X-Enigmail-Version: 0.95.0 Content-Type: multipart/alternative; boundary="------------050002010209080105070509" X-Archives-Salt: f5465cb2-4f8c-4f03-b032-702e2d69dfbe X-Archives-Hash: 708d245f7c2942e8d11d0d34e7cb8242 This is a multi-part message in MIME format. --------------050002010209080105070509 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit If you don't want the versions, as Duncan wrote, I would suggest that you use eix. eix -I will provide a pretty-printed list of all the packages installed on your system. Read its man page to find out how to do custom formatting. You can have it print just the package name, the category and package names, versions, use flags, etc. Once you get a feel for its syntax, you shouldn't have any trouble getting the information you need. Be careful, though, to run update-eix before doing anything because eix uses an index database, not the actual portage tree or data. If you make any changes to your system, eix will not know it until you run update-eix. Dustin C. Hatch http://www.dchweb.com Duncan wrote: > "Mark Haney" posted > 462E2157.5050606@ercbroadband.org, excerpted below, on Tue, 24 Apr 2007 > 11:25:11 -0400: > > >> A while back, someone posted a command that I think pulled all the info >> from 'emerge -eav world' into a nice neat package so that a GCC upgrade >> can be done in smaller increments. Now, however, I can't seem to find >> it in the archives, or in my stored list backup. Can someone throw me a >> copy of that post or point me to the right one online? >> > > emerge -pe world|grep /|cut -f2 -d"]"|sed "s/^ /=/" > > That'll give you a list of packages, with the versions, preceded by "=" > for each one, so emerge will give you exactly the same versions. You can > redirect it to a file as necessary. > > If you want it without versions, so as to emerge the latest, it gets > somewhat hairier, because the version strings are somewhat difficult to > automatically delete without error. I usually just take the lazy way > out, replacing that sed above with another cut, as so: > > emerge -pe world|grep /|cut -f2 -d"]"|cut -f2 -d" " > > That still leaves the versions. Then I open the redirect file in my > favorite editor and use search and replace with prompt, playing with the > search pattern and repeating until I get what I want. A regex pattern of > -[-abcr.0-9]*$, replaced with gets most of it, but leaves > strings such as -alpha and -beta, which are easy enough to remove on > either further searches or manually. Of course, it's possible to include > those in the regex search pattern as well, and would be possible to then > make that a sed command, but it's difficult to get exactly right, then > remember, and easy enough to do in a decent editor, so that's what I do. > > --------------050002010209080105070509 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by robin.gentoo.org id l3PC3vxY024148 If you don't want the versions, as Duncan wrote, I would suggest that you use eix.=C2=A0 eix -I will provide a pretty-printed list of all the packages installed on your system.=C2=A0 R= ead its man page to find out how to do custom formatting.=C2=A0 You can have = it print just the package name, the category and package names, versions, use flags, etc.=C2=A0 Once you get a feel for its syntax, you shouldn't h= ave any trouble getting the information you need.

Be careful, though, to run update-eix before doing anything because eix uses an index database, not the actual portage tree or data.=C2=A0 If you make any changes to your system, eix will not know it until you run update-eix.
Dustin C. Hatch
http://=
www.dchweb.com


Duncan wrote:
"Mark Haney" <mhaney@ercbroadband.org> poste=
d
462E2157.5050606@ercbroadband.org, excerpted below, on=
  Tue, 24 Apr 2007
11:25:11 -0400:

  
A while back, someone posted a command that I think pu=
lled all the info
from 'emerge -eav world' into a nice neat package so that a GCC upgrade
can be done in smaller increments.  Now, however, I can't seem to find
it in the archives, or in my stored list backup.  Can someone throw me a
copy of that post or point me to the right one online?
    

emerge -pe world|grep /|cut -f2 -d"]"|sed "s/^ /=3D/"

That'll give you a list of packages, with the versions, preceded by "=3D"=
=20
for each one, so emerge will give you exactly the same versions.  You can=
=20
redirect it to a file as necessary.

If you want it without versions, so as to emerge the latest, it gets=20
somewhat hairier, because the version strings are somewhat difficult to=20
automatically delete without error.  I usually just take the lazy way=20
out, replacing that sed above with another cut, as so:

emerge -pe world|grep /|cut -f2 -d"]"|cut -f2 -d" "

That still leaves the versions.  Then I open the redirect file in my=20
favorite editor and use search and replace with prompt, playing with the=20
search pattern and repeating until I get what I want.  A regex pattern of=
=20
-[-abcr.0-9]*$, replaced with <nothing> gets most of it, but leaves=
=20
strings such as -alpha and -beta, which are easy enough to remove on=20
either further searches or manually.  Of course, it's possible to include=
=20
those in the regex search pattern as well, and would be possible to then=20
make that a sed command, but it's difficult to get exactly right, then=20
remember, and easy enough to do in a decent editor, so that's what I do.

  
--------------050002010209080105070509-- -- gentoo-amd64@gentoo.org mailing list