public inbox for gentoo-amd64@lists.gentoo.org
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: gentoo-amd64@lists.gentoo.org
Subject: [gentoo-amd64]  Re: GCC upgrade script
Date: Wed, 25 Apr 2007 09:07:46 +0000 (UTC)	[thread overview]
Message-ID: <pan.2007.04.25.09.07.46@cox.net> (raw)
In-Reply-To: 462E2157.5050606@ercbroadband.org

"Mark Haney" <mhaney@ercbroadband.org> 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 <nothing> 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.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

-- 
gentoo-amd64@gentoo.org mailing list



  parent reply	other threads:[~2007-04-25  9:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-24 15:25 [gentoo-amd64] GCC upgrade script Mark Haney
2007-04-25  8:34 ` [gentoo-amd64] " Stefan Wimmer
2007-04-25  9:07 ` Duncan [this message]
2007-04-25 12:03   ` Dustin C. Hatch
2007-04-25 13:39     ` Bo Ørsted Andresen
2007-04-25 13:57       ` Wil Reichert
2007-04-25 14:48         ` Bo Ørsted Andresen
2007-04-25 13:29   ` Bo Ørsted Andresen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pan.2007.04.25.09.07.46@cox.net \
    --to=1i5t5.duncan@cox.net \
    --cc=gentoo-amd64@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox