public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:pending commit in: targets/stage1/
Date: Thu, 21 May 2015 23:53:31 +0000 (UTC)	[thread overview]
Message-ID: <1427511915.6b5ca8e6aa5469660c1657a104655c9026725c15.dolsen@gentoo> (raw)

commit:     6b5ca8e6aa5469660c1657a104655c9026725c15
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 19 20:23:01 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Mar 28 03:05:15 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6b5ca8e6

targets/stage1/stage1-chroot.sh: don't quote ${clst_HOSTUSEEXPAND}

Remove the quotes on ${clst_HOSTUSEEXPAND} so the for loops skip
any iterations when clst_HOSTUSEEXPAND is unset.  Otherwise a
spurious line is introduced in the make.conf file which causes
a syntax error.

To illustrate the problem, run the follow two lines of bash:

  unset A ; for i in $A; do echo x${i}x ; done    #line 1
  unset A ; for i in "$A"; do echo x${i}x ; done  #line 2

Line 1 leads to no output, while line 2 leads to "xx".

We also fix a typo in the sed line.

Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 targets/stage1/stage1-chroot.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh
index f79f360..63aa563 100755
--- a/targets/stage1/stage1-chroot.sh
+++ b/targets/stage1/stage1-chroot.sh
@@ -57,7 +57,7 @@ sed -i '/USE="${USE} -build"/d' /etc/portage/make.conf
 if [ -e /etc/portage/make.conf ]; then
 	echo "USE=\"-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"" \
 	>> /etc/portage/make.conf
-	for useexpand in "${clst_HOSTUSEEXPAND}"; do
+	for useexpand in ${clst_HOSTUSEEXPAND}; do
 		x="clst_${useexpand}"
 		echo "${useexpand}=\"${!x}\"" \
 		>> /etc/portage/make.conf
@@ -66,8 +66,8 @@ fi
 run_merge "--oneshot ${clst_buildpkgs}"
 sed -i "/USE=\"-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"/d" \
 	/etc/portage/make.conf
-for useexpand in "${clst_HOSTUSEEXPAND}"; do
+for useexpand in ${clst_HOSTUSEEXPAND}; do
 	x="clst_${useexpand}"
-	sed -i "${useexpand}=\"${!x}\"" \
+	sed -i "/${useexpand}=\"${!x}\"/d" \
 	/etc/portage/make.conf
 done


WARNING: multiple messages have this Message-ID (diff)
From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:master commit in: targets/stage1/
Date: Sun, 24 May 2015 00:08:31 +0000 (UTC)	[thread overview]
Message-ID: <1427511915.6b5ca8e6aa5469660c1657a104655c9026725c15.dolsen@gentoo> (raw)
Message-ID: <20150524000831.Z8-4tmLLsZR-RrhrI8ddscWUtSdl-Ag8f1P7WDJBJDE@z> (raw)

commit:     6b5ca8e6aa5469660c1657a104655c9026725c15
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 19 20:23:01 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Mar 28 03:05:15 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6b5ca8e6

targets/stage1/stage1-chroot.sh: don't quote ${clst_HOSTUSEEXPAND}

Remove the quotes on ${clst_HOSTUSEEXPAND} so the for loops skip
any iterations when clst_HOSTUSEEXPAND is unset.  Otherwise a
spurious line is introduced in the make.conf file which causes
a syntax error.

To illustrate the problem, run the follow two lines of bash:

  unset A ; for i in $A; do echo x${i}x ; done    #line 1
  unset A ; for i in "$A"; do echo x${i}x ; done  #line 2

Line 1 leads to no output, while line 2 leads to "xx".

We also fix a typo in the sed line.

Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 targets/stage1/stage1-chroot.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh
index f79f360..63aa563 100755
--- a/targets/stage1/stage1-chroot.sh
+++ b/targets/stage1/stage1-chroot.sh
@@ -57,7 +57,7 @@ sed -i '/USE="${USE} -build"/d' /etc/portage/make.conf
 if [ -e /etc/portage/make.conf ]; then
 	echo "USE=\"-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"" \
 	>> /etc/portage/make.conf
-	for useexpand in "${clst_HOSTUSEEXPAND}"; do
+	for useexpand in ${clst_HOSTUSEEXPAND}; do
 		x="clst_${useexpand}"
 		echo "${useexpand}=\"${!x}\"" \
 		>> /etc/portage/make.conf
@@ -66,8 +66,8 @@ fi
 run_merge "--oneshot ${clst_buildpkgs}"
 sed -i "/USE=\"-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"/d" \
 	/etc/portage/make.conf
-for useexpand in "${clst_HOSTUSEEXPAND}"; do
+for useexpand in ${clst_HOSTUSEEXPAND}; do
 	x="clst_${useexpand}"
-	sed -i "${useexpand}=\"${!x}\"" \
+	sed -i "/${useexpand}=\"${!x}\"/d" \
 	/etc/portage/make.conf
 done


             reply	other threads:[~2015-05-21 23:53 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21 23:53 Brian Dolbec [this message]
2015-05-24  0:08 ` [gentoo-commits] proj/catalyst:master commit in: targets/stage1/ Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2017-11-29 17:20 Brian Dolbec
2017-11-22 15:52 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2017-03-16 22:57 Brian Dolbec
2017-03-11  9:35 Brian Dolbec
2017-03-11  7:07 Brian Dolbec
2015-09-08 14:14 Brian Dolbec
2015-09-03 15:14 Brian Dolbec
2015-09-01  5:58 Brian Dolbec
2015-09-01  5:58 Brian Dolbec
2015-09-01  5:58 Brian Dolbec
2015-09-01  5:58 Brian Dolbec
2014-09-02  5:54 Brian Dolbec
2014-09-02  2:43 Brian Dolbec
2014-01-22 15:52 Brian Dolbec
2014-01-22 15:52 Brian Dolbec
2014-01-03  6:41 Brian Dolbec
2014-01-03  6:41 Brian Dolbec
2014-01-03  6:12 Brian Dolbec
2014-01-03  6:12 Brian Dolbec
2014-01-03  5:03 Brian Dolbec
2014-01-03  5:03 Brian Dolbec
2014-01-02  0:04 Brian Dolbec
2014-01-02  0:04 Brian Dolbec
2013-12-31 18:14 Brian Dolbec
2013-12-31 18:14 Brian Dolbec
2013-12-31  4:48 Brian Dolbec
2013-12-31  4:48 Brian Dolbec
2013-12-31  4:39 Brian Dolbec
2013-12-31  4:39 Brian Dolbec
2013-12-31  4:22 Brian Dolbec
2013-12-31  4:22 Brian Dolbec
2013-12-30  1:44 Brian Dolbec
2013-12-30  1:44 Brian Dolbec
2013-12-20  0:48 Brian Dolbec
2013-12-20  0:48 Brian Dolbec
2013-12-20  0:29 Brian Dolbec
2013-12-20  0:29 Brian Dolbec

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=1427511915.6b5ca8e6aa5469660c1657a104655c9026725c15.dolsen@gentoo \
    --to=dolsen@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