setup_pkgmgr(): Make the 'build' use flag passed in
authorBrian Dolbec <dolsen@gentoo.org>
Mon, 1 Sep 2014 22:10:38 +0000 (15:10 -0700)
committerBrian Dolbec <dolsen@gentoo.org>
Thu, 11 Sep 2014 03:05:29 +0000 (20:05 -0700)
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.

targets/stage1/stage1-chroot.sh
targets/support/chroot-functions.sh

index ed83f3852f456bb195285657ef7269800a9da2c1..eccbd3fb1e9fef232fea4039a6494e5f6cdd664f 100755 (executable)
@@ -21,7 +21,7 @@ then
 fi
 
 ## Setup seed pkgmgr to ensure latest
 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
 
 # Update stage3
 if [ -n "${clst_update_seed}" ]; then
index a31e8bf7ac55b5a8feddc4387da37ded97c64a71..ee820edebfe36916d67e33e277e989fe80987e89 100755 (executable)
@@ -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.
        # 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() {
 }
 
 cleanup_distcc() {