diff options
author | Brian Dolbec <dolsen@gentoo.org> | 2014-09-01 15:10:38 -0700 |
---|---|---|
committer | Brian Dolbec <dolsen@gentoo.org> | 2014-09-10 19:07:04 -0700 |
commit | d0cd8017d52eaacb7142a58a7fba9f0a1f320714 (patch) | |
tree | f0606e762fc0487c9bf3615b541a7fdc695ae56e /targets | |
parent | chroot-functions.sh: Fix a mis-worded comment (diff) | |
download | catalyst-d0cd8017d52eaacb7142a58a7fba9f0a1f320714.tar.gz catalyst-d0cd8017d52eaacb7142a58a7fba9f0a1f320714.tar.bz2 catalyst-d0cd8017d52eaacb7142a58a7fba9f0a1f320714.zip |
setup_pkgmgr(): Make the 'build' use flag passed in
The "build" USE flag is only needed for the stage1 build.
It also causes other errors in later stages.
This makes setup_pkgmgr() takes an optional USE flag string
parameter to be added to the USE variable.
Diffstat (limited to 'targets')
-rwxr-xr-x | targets/stage1/stage1-chroot.sh | 2 | ||||
-rwxr-xr-x | targets/support/chroot-functions.sh | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index ed83f385..eccbd3fb 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -21,7 +21,7 @@ then fi ## Setup seed pkgmgr to ensure latest -clst_root_path=/ setup_pkgmgr +clst_root_path=/ setup_pkgmgr "build" # Update stage3 if [ -n "${clst_update_seed}" ]; then diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index a31e8bf7..ee820ede 100755 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -170,9 +170,15 @@ setup_pkgmgr(){ # portage to avoid frying our /etc/portage/make.conf file. Otherwise, we could # just let emerge @system could merge it. # Use --update or portage might just waste time/cycles and reinstall the same version. - [ -e /etc/portage/make.conf ] && echo 'USE="${USE} build"' >> /etc/portage/make.conf - run_merge --oneshot --update sys-apps/portage - sed -i '/USE="${USE} build"/d' /etc/portage/make.conf + if [ -n "$1" ];then + echo "Adding USE='${USE} $1' to make.conf for portage build" + [ -e /etc/portage/make.conf ] && echo 'USE="${USE} $1"' >> /etc/portage/make.conf + run_merge --oneshot --update sys-apps/portage + sed -i '/USE="${USE} $1"/d' /etc/portage/make.conf + else + echo "Updating portage with USE='${USE}'" + run_merge --oneshot --update sys-apps/portage + fi } cleanup_distcc() { |