commit:     8ee55e7a6e7e75c367f944b6127ae0a7b5a61474
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  3 16:31:42 2016 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Apr  3 16:39:21 2016 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=8ee55e7a

do_emerge_pkgs: make sure USE-overrides mask built-in list

 scripts/bootstrap-prefix.sh | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 5d6fbc1..94ac95d 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1070,6 +1070,30 @@ do_emerge_pkgs() {
                done
                [[ -n ${pvdb} ]] && continue
 
+               local myuse=(
+                       -berkdb
+                       -fortran
+                       -gdbm
+                       -git
+                       -libcxx
+                       -nls
+                       -pcre
+                       -ssl
+                       -python
+                       bootstrap
+                       clang
+                       internal-glib
+               )
+               myuse=" ${myuse[*]} "
+               local use
+               for use in ${USE} ; do
+                       myuse=" ${myuse/ ${use} /} "
+                       myuse=" ${myuse/ -${use} /} "
+                       myuse=" ${myuse/ ${use#-} /} "
+                       myuse+=" ${use} "
+               done
+               myuse=( ${myuse} )
+
                # Disable the STALE warning because the snapshot frequently 
gets stale.
                #
                # Need need to spam the user about news until the emerge -e 
system
@@ -1080,7 +1104,7 @@ do_emerge_pkgs() {
                PORTAGE_SYNC_STALE=0 \
                FEATURES="-news ${FEATURES}" \
                PYTHONPATH="${ROOT}"/tmp/usr/lib/portage/pym \
-               USE="-berkdb -fortran -gdbm -git -libcxx -nls -pcre -ssl 
-python bootstrap clang internal-glib ${USE}" \
+               USE="${myuse[*]}" \
                CFLAGS= CXXFLAGS= \
                emerge -v --oneshot --root-deps ${opts} "${pkg}" || return 1
        done

Reply via email to