aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>2017-03-11 00:39:12 +0000
committerBrian Dolbec <dolsen@gentoo.org>2017-11-21 17:16:21 -0800
commit2d574bfa8e5f385f495b3b3e7f4df882bb6751c4 (patch)
tree524d335e999b8069f68287e0f8f49a6618afb211
parentbase/stagebase.py: Update the cleanables to the new repo variables (diff)
downloadcatalyst-2d574bfa8e5f385f495b3b3e7f4df882bb6751c4.tar.gz
catalyst-2d574bfa8e5f385f495b3b3e7f4df882bb6751c4.tar.bz2
catalyst-2d574bfa8e5f385f495b3b3e7f4df882bb6751c4.zip
Improve the order of USE definition, make sure to remove USE after building portage, add the contents of BOOTSTRAP_USE to USE and clean USE and CATALYST_USE after building pacakges.
Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>
-rwxr-xr-xtargets/stage1/stage1-chroot.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh
index f2438660..1b0aa08b 100755
--- a/targets/stage1/stage1-chroot.sh
+++ b/targets/stage1/stage1-chroot.sh
@@ -25,7 +25,7 @@ clst_root_path=/ setup_pkgmgr "build"
# We need to ensure the base stage3 has USE="bindist"
# if BINDIST is set to avoid issues with openssl / openssh
-[ -e ${clst_make_conf} ] && echo "USE=\"${USE} ${BINDIST}\"" >> ${clst_make_conf}
+[ -e ${clst_make_conf} ] && echo "USE=\"${BINDIST} ${USE}\"" >> ${clst_make_conf}
# Update stage3
if [ -n "${clst_update_seed}" ]; then
@@ -48,7 +48,7 @@ else
fi
# Clear USE
-[ -e ${clst_make_conf} ] && sed -i -e "USE=\"s/${BINDIST}//" ${clst_make_conf}
+[ -e ${clst_make_conf} ] && sed -i -e "/^USE=\"${BINDIST} ${USE}\"/d" ${clst_make_conf}
make_destpath /tmp/stage1root
@@ -61,7 +61,8 @@ sed -i "/USE=\"${USE} -build\"/d" ${clst_make_conf}
# Now, we install our packages
if [ -e ${clst_make_conf} ]; then
echo "CATALYST_USE=\"-* build ${BINDIST} ${clst_CATALYST_USE}\"" >> ${clst_make_conf}
- echo "USE=\"\${CATALYST_USE} ${USE} \${BOOTSTRAP_USE} ${clst_HOSTUSE}\"" >> ${clst_make_conf}
+ echo "USE=\"\${CATALYST_USE} ${USE} ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"" >> ${clst_make_conf}
+
for useexpand in ${clst_HOSTUSEEXPAND}; do
x="clst_${useexpand}"
echo "${useexpand}=\"${!x}\"" \
@@ -77,3 +78,7 @@ for useexpand in ${clst_HOSTUSEEXPAND}; do
sed -i "/${useexpand}=\"${!x}\"/d" \
${clst_make_conf}
done
+
+# Clear USE
+[ -e ${clst_make_conf} ] && sed -i -e "/^CATALYST_USE/d" ${clst_make_conf}
+[ -e ${clst_make_conf} ] && sed -i -e "/^USE=\"/s/\${CATALYST_USE} ${USE} ${BOOTSTRAP_USE}//" ${clst_make_conf}