commit: 3dba87d0ba4def5d4306baed53ef5341ad7f314e
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 7 13:41:28 2019 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Mar 7 13:43:03 2019 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=3dba87d0
scripts/bootstrap-prefix: avoid errors for every emerge
etc/portage may not exist, so ensure it is created, and don't assume
make.conf exists in it
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
scripts/bootstrap-prefix.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index da6017f1bd..d014d9dbb2 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1489,7 +1489,9 @@ do_emerge_pkgs() {
;;
esac
done
- sed -i -e '/#stage3_temp#/d'
"${EPREFIX}"/tmp/etc/portage/make.conf
+ mkdir -p "${EPREFIX}"/tmp/etc/portage
+ [[ -e "${EPREFIX}"/tmp/etc/portage/make.conf ]] && \
+ sed -i -e '/#stage3_temp#/d'
"${EPREFIX}"/tmp/etc/portage/make.conf
{
echo "CFLAGS=\"\${CFLAGS} ${OVERRIDE_CFLAGS}\"
#stage3_temp#"
echo "CXXFLAGS=\"\${CXXFLAGS} ${OVERRIDE_CXXFLAGS}\"
#stage3_temp#"