commit:     7639bead240dd9125eae47c9f35a3e7269603c76
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 14 21:03:31 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Jun 14 21:03:31 2015 +0000
URL:        https://gitweb.gentoo.org/proj/releng.git/commit/?id=7639bead

tools-musl: fix when portage_confdir is missing.

 tools-musl/run-armv7a.sh           | 4 ++++
 tools-musl/run-mips32r2.sh         | 5 +++++
 tools-musl/run-mipsel3.sh          | 5 +++++
 tools-musl/run-ppc.sh              | 5 +++++
 tools-musl/run.sh                  | 5 +++++
 tools-musl/stage-all.conf.template | 2 +-
 6 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/tools-musl/run-armv7a.sh b/tools-musl/run-armv7a.sh
index f2ff4a0..6892f2f 100755
--- a/tools-musl/run-armv7a.sh
+++ b/tools-musl/run-armv7a.sh
@@ -38,6 +38,10 @@ prepare_confs() {
     echo "cflags: -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard" 
>> \
       stage${s}-${arch}-musl-${flavor}.conf
 
+    portage_confdir=$(grep portage_confdir 
stage${s}-${arch}-musl-${flavor}.conf \
+      | sed -e 's/^.*://')
+    [[ ! -e ${portage_confdir} ]] && sed -i -e '/^portage_confdir/d' \
+      stage${s}-${arch}-musl-${flavor}.conf
   done
 
   sed -i "/^chost/d" stage3-${arch}-musl-${flavor}.conf

diff --git a/tools-musl/run-mips32r2.sh b/tools-musl/run-mips32r2.sh
index 07d5778..0818361 100755
--- a/tools-musl/run-mips32r2.sh
+++ b/tools-musl/run-mips32r2.sh
@@ -27,6 +27,11 @@ prepare_confs() {
         -e "s|^cflags:.*|cflags: -O2 -march=mips3 -mplt 
-Wa,-mfix-loongson2f-nop -pipe|" \
         -e "s|^cxxflags:.*|cxxflags: -O2 -march=mips3 -mplt 
-Wa,-mfix-loongson2f-nop -pipe|" \
         >  stage${s}-${arch}-musl-${flavor}.conf
+
+    portage_confdir=$(grep portage_confdir 
stage${s}-${arch}-musl-${flavor}.conf \
+      | sed -e 's/^.*://')
+    [[ ! -e ${portage_confdir} ]] && sed -i -e '/^portage_confdir/d' \
+      stage${s}-${arch}-musl-${flavor}.conf
   done
 
   sed -i "/^chost/d" stage3-${arch}-musl-${flavor}.conf

diff --git a/tools-musl/run-mipsel3.sh b/tools-musl/run-mipsel3.sh
index 50e5d57..51c6753 100755
--- a/tools-musl/run-mipsel3.sh
+++ b/tools-musl/run-mipsel3.sh
@@ -27,6 +27,11 @@ prepare_confs() {
         -e "s|^cflags:.*|cflags: -O2 -march=mips3 -mplt 
-Wa,-mfix-loongson2f-nop -pipe|" \
         -e "s|^cxxflags:.*|cxxflags: -O2 -march=mips3 -mplt 
-Wa,-mfix-loongson2f-nop -pipe|" \
         >  stage${s}-${arch}-musl-${flavor}.conf
+
+    portage_confdir=$(grep portage_confdir 
stage${s}-${arch}-musl-${flavor}.conf \
+      | sed -e 's/^.*://')
+    [[ ! -e ${portage_confdir} ]] && sed -i -e '/^portage_confdir/d' \
+      stage${s}-${arch}-musl-${flavor}.conf
   done
 
   sed -i "/^chost/d" stage3-${arch}-musl-${flavor}.conf

diff --git a/tools-musl/run-ppc.sh b/tools-musl/run-ppc.sh
index 4294391..bb51672 100755
--- a/tools-musl/run-ppc.sh
+++ b/tools-musl/run-ppc.sh
@@ -27,6 +27,11 @@ prepare_confs() {
         -e "s:FLAVOR:${flavor}:g" \
         -e "s:MYCATALYST:$(pwd):g" \
         >  stage${s}-${arch}-musl-${flavor}.conf
+
+    portage_confdir=$(grep portage_confdir 
stage${s}-${arch}-musl-${flavor}.conf \
+      | sed -e 's/^.*://')
+    [[ ! -e ${portage_confdir} ]] && sed -i -e '/^portage_confdir/d' \
+      stage${s}-${arch}-musl-${flavor}.conf
   done
 
   sed -i "/^chost/d" stage3-${arch}-musl-${flavor}.conf

diff --git a/tools-musl/run.sh b/tools-musl/run.sh
index 7f82a8e..17d883b 100755
--- a/tools-musl/run.sh
+++ b/tools-musl/run.sh
@@ -29,6 +29,11 @@ prepare_confs() {
         -e "s:FLAVOR:${flavor}:g" \
         -e "s:MYCATALYST:$(pwd):g" \
         >  stage${s}-${arch}-musl-${flavor}.conf
+
+    portage_confdir=$(grep portage_confdir 
stage${s}-${arch}-musl-${flavor}.conf \
+      | sed -e 's/^.*://')
+    [[ ! -e ${portage_confdir} ]] && sed -i -e '/^portage_confdir/d' \
+      stage${s}-${arch}-musl-${flavor}.conf
   done
 
   sed -i "/^chost/d" stage3-${arch}-musl-${flavor}.conf

diff --git a/tools-musl/stage-all.conf.template 
b/tools-musl/stage-all.conf.template
index d7dab4b..942b02b 100644
--- a/tools-musl/stage-all.conf.template
+++ b/tools-musl/stage-all.conf.template
@@ -9,4 +9,4 @@ chost: TARCH-gentoo-linux-musl
 cflags: -O2 -pipe -fomit-frame-pointer
 cxxflags: -O2 -pipe -fomit-frame-pointer
 portage_confdir: MYCATALYST/portage.SARCH.FLAVOR
-portage_overlay: /var/lib/layman/hardened-development-musl
+portage_overlay: /var/lib/layman/musl

Reply via email to