1 |
commit: bee36446f7efcdf8c4743e5853f9a11671ffa3a7 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 1 22:10:38 2014 +0000 |
4 |
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> |
5 |
CommitDate: Tue Sep 2 05:43:37 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=bee36446 |
7 |
|
8 |
setup_pkgmgr(): WIP Make the 'build' use flag optional |
9 |
|
10 |
--- |
11 |
targets/stage1/stage1-chroot.sh | 1 + |
12 |
targets/stage2/stage2-chroot.sh | 1 + |
13 |
targets/support/chroot-functions.sh | 13 ++++++++++--- |
14 |
3 files changed, 12 insertions(+), 3 deletions(-) |
15 |
|
16 |
diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh |
17 |
index ed83f38..7d8589f 100755 |
18 |
--- a/targets/stage1/stage1-chroot.sh |
19 |
+++ b/targets/stage1/stage1-chroot.sh |
20 |
@@ -21,6 +21,7 @@ then |
21 |
fi |
22 |
|
23 |
## Setup seed pkgmgr to ensure latest |
24 |
+export PKGMGR_BUILD='yes' |
25 |
clst_root_path=/ setup_pkgmgr |
26 |
|
27 |
# Update stage3 |
28 |
|
29 |
diff --git a/targets/stage2/stage2-chroot.sh b/targets/stage2/stage2-chroot.sh |
30 |
index 61f5261..0f70a84 100755 |
31 |
--- a/targets/stage2/stage2-chroot.sh |
32 |
+++ b/targets/stage2/stage2-chroot.sh |
33 |
@@ -4,6 +4,7 @@ source /tmp/chroot-functions.sh |
34 |
|
35 |
# Setup the environment |
36 |
export FEATURES="${clst_myfeatures} nodoc noman noinfo -news" |
37 |
+export PKGMGR_BUILD='yes' |
38 |
|
39 |
if [ "${clst_VERBOSE}" ] |
40 |
then |
41 |
|
42 |
diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh |
43 |
index 3495f14..6260c69 100755 |
44 |
--- a/targets/support/chroot-functions.sh |
45 |
+++ b/targets/support/chroot-functions.sh |
46 |
@@ -170,9 +170,16 @@ setup_pkgmgr(){ |
47 |
# portage to avoid frying our /etc/portage/make.conf file. Otherwise, we could |
48 |
# just let emerge @system could merge it. |
49 |
# Use --update or portage will reinstall the same version. |
50 |
- [ -e /etc/portage/make.conf ] && echo 'USE="${USE} build"' >> /etc/portage/make.conf |
51 |
- run_merge --oneshot --update sys-apps/portage |
52 |
- sed -i '/USE="${USE} build"/d' /etc/portage/make.conf |
53 |
+ if [ -n "${PKGMGR_BUILD}" ];then |
54 |
+ echo "Adding USE='${USE} build' to make.conf for portage build" |
55 |
+ [ -e /etc/portage/make.conf ] && echo 'USE="${USE} build"' >> /etc/portage/make.conf |
56 |
+ run_merge --oneshot --update sys-apps/portage |
57 |
+ sed -i '/USE="${USE} build"/d' /etc/portage/make.conf |
58 |
+ else |
59 |
+ echo "Updating portage with normal USE=" |
60 |
+ run_merge --oneshot --update sys-apps/portage |
61 |
+ fi |
62 |
+ |
63 |
} |
64 |
|
65 |
cleanup_distcc() { |