public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico (zmedico)" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in scripts: bootstrap.sh
Date: Tue, 23 Oct 2012 02:25:23 +0000 (UTC)	[thread overview]
Message-ID: <20121023022523.A5C5821601@flycatcher.gentoo.org> (raw)

zmedico     12/10/23 02:25:23

  Modified:             bootstrap.sh
  Log:
  Fix profile packages parsing code for bug #439282.

Revision  Changes    Path
1.96                 scripts/bootstrap.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/scripts/bootstrap.sh?rev=1.96&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/scripts/bootstrap.sh?rev=1.96&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/scripts/bootstrap.sh?r1=1.95&r2=1.96

Index: bootstrap.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/scripts/bootstrap.sh,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- bootstrap.sh	7 Jul 2012 03:34:53 -0000	1.95
+++ bootstrap.sh	23 Oct 2012 02:25:23 -0000	1.96
@@ -1,7 +1,7 @@
 #!/bin/bash
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/scripts/bootstrap.sh,v 1.95 2012/07/07 03:34:53 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/scripts/bootstrap.sh,v 1.96 2012/10/23 02:25:23 zmedico Exp $
 
 # people who were here:
 # (drobbins, 06 Jun 2003)
@@ -52,7 +52,7 @@
 	env "$@"
 }
 
-cvsver="$Header: /var/cvsroot/gentoo-x86/scripts/bootstrap.sh,v 1.95 2012/07/07 03:34:53 vapier Exp $"
+cvsver="$Header: /var/cvsroot/gentoo-x86/scripts/bootstrap.sh,v 1.96 2012/10/23 02:25:23 zmedico Exp $"
 cvsver=${cvsver##*,v }
 cvsver=${cvsver%%Exp*}
 cvsyear=${cvsver#* }
@@ -253,9 +253,15 @@
 # parents.  So we now call portage to read the aggregate profile and store
 # that into a variable.
 
-eval $(pycmd 'import portage, sys; sys.stdout.write(str([str(x) for x in portage.settings.packages]));' |
-sed 's/[][,]//g; s/\*//g' | tr ' ' '\n' | while read p; do n=${p##*/}; n=${n%\'};
-n=${n%%-[0-9]*}; echo "my$(tr a-z- A-Z_ <<<$n)=$p; "; done)
+eval $(pycmd '
+import portage
+import sys
+for atom in portage.settings.packages:
+	if not isinstance(atom, portage.dep.Atom):
+		atom = portage.dep.Atom(atom.lstrip("*"))
+	varname = "my" + portage.catsplit(atom.cp)[1].upper().replace("-", "_")
+	sys.stdout.write("%s=\"%s\"; " % (varname, atom))
+')
 
 # This stuff should never fail but will if not enough is installed.
 [[ -z ${myBASELAYOUT} ]] && myBASELAYOUT=">=$(portageq best_version / sys-apps/baselayout)"





             reply	other threads:[~2012-10-23  2:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-23  2:25 Zac Medico (zmedico) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-02-04 10:07 [gentoo-commits] gentoo-x86 commit in scripts: bootstrap.sh Joshua Kinard (kumba)
2014-03-13 16:11 William Hubbs (williamh)
2013-06-27 21:04 Zac Medico (zmedico)
2012-07-07  3:34 Mike Frysinger (vapier)
2011-11-17  1:51 Jorge Manuel B. S. Vicetto (jmbsvicetto)
2011-07-14 19:19 Zac Medico (zmedico)
2011-07-14  1:24 Jorge Manuel B. S. Vicetto (jmbsvicetto)
2011-05-20  3:05 Jorge Manuel B. S. Vicetto (jmbsvicetto)
2010-09-11 17:06 Zac Medico (zmedico)
2009-09-25  5:17 Zac Medico (zmedico)
2009-08-06 22:21 Zac Medico (zmedico)
2008-03-30 16:51 Mike Frysinger (vapier)

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=20121023022523.A5C5821601@flycatcher.gentoo.org \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@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