1 |
commit: 2d574bfa8e5f385f495b3b3e7f4df882bb6751c4 |
2 |
Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 11 00:39:12 2017 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 22 01:16:21 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=2d574bfa |
7 |
|
8 |
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. |
9 |
|
10 |
Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo.org> |
11 |
|
12 |
targets/stage1/stage1-chroot.sh | 11 ++++++++--- |
13 |
1 file changed, 8 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh |
16 |
index f2438660..1b0aa08b 100755 |
17 |
--- a/targets/stage1/stage1-chroot.sh |
18 |
+++ b/targets/stage1/stage1-chroot.sh |
19 |
@@ -25,7 +25,7 @@ clst_root_path=/ setup_pkgmgr "build" |
20 |
|
21 |
# We need to ensure the base stage3 has USE="bindist" |
22 |
# if BINDIST is set to avoid issues with openssl / openssh |
23 |
-[ -e ${clst_make_conf} ] && echo "USE=\"${USE} ${BINDIST}\"" >> ${clst_make_conf} |
24 |
+[ -e ${clst_make_conf} ] && echo "USE=\"${BINDIST} ${USE}\"" >> ${clst_make_conf} |
25 |
|
26 |
# Update stage3 |
27 |
if [ -n "${clst_update_seed}" ]; then |
28 |
@@ -48,7 +48,7 @@ else |
29 |
fi |
30 |
|
31 |
# Clear USE |
32 |
-[ -e ${clst_make_conf} ] && sed -i -e "USE=\"s/${BINDIST}//" ${clst_make_conf} |
33 |
+[ -e ${clst_make_conf} ] && sed -i -e "/^USE=\"${BINDIST} ${USE}\"/d" ${clst_make_conf} |
34 |
|
35 |
make_destpath /tmp/stage1root |
36 |
|
37 |
@@ -61,7 +61,8 @@ sed -i "/USE=\"${USE} -build\"/d" ${clst_make_conf} |
38 |
# Now, we install our packages |
39 |
if [ -e ${clst_make_conf} ]; then |
40 |
echo "CATALYST_USE=\"-* build ${BINDIST} ${clst_CATALYST_USE}\"" >> ${clst_make_conf} |
41 |
- echo "USE=\"\${CATALYST_USE} ${USE} \${BOOTSTRAP_USE} ${clst_HOSTUSE}\"" >> ${clst_make_conf} |
42 |
+ echo "USE=\"\${CATALYST_USE} ${USE} ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"" >> ${clst_make_conf} |
43 |
+ |
44 |
for useexpand in ${clst_HOSTUSEEXPAND}; do |
45 |
x="clst_${useexpand}" |
46 |
echo "${useexpand}=\"${!x}\"" \ |
47 |
@@ -77,3 +78,7 @@ for useexpand in ${clst_HOSTUSEEXPAND}; do |
48 |
sed -i "/${useexpand}=\"${!x}\"/d" \ |
49 |
${clst_make_conf} |
50 |
done |
51 |
+ |
52 |
+# Clear USE |
53 |
+[ -e ${clst_make_conf} ] && sed -i -e "/^CATALYST_USE/d" ${clst_make_conf} |
54 |
+[ -e ${clst_make_conf} ] && sed -i -e "/^USE=\"/s/\${CATALYST_USE} ${USE} ${BOOTSTRAP_USE}//" ${clst_make_conf} |