commit: 5ac36c898da7ad5924d976adfc8b002c0fd378d2
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 6 19:46:13 2015 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec 20 17:37:00 2015 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=5ac36c89
Move QA_PREBUILT handling into src_install()
Delay QA_PREBUILT handling until src_install(), to allow setting it in
phase function like pkg_setup(). This shouldn't cause any issues since
the resulting variables are not used before install.
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>
bin/ebuild.sh | 25 -------------------------
bin/phase-functions.sh | 27 +++++++++++++++++++++++++++
2 files changed, 27 insertions(+), 25 deletions(-)
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 4319a17..f1586b2 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -704,31 +704,6 @@ if ! has "$EBUILD_PHASE" clean cleanrm ; then
[[ -n $CCACHE_SIZE ]] && ccache -M $CCACHE_SIZE
&> /dev/null
fi
-
- if [[ -n $QA_PREBUILT ]] ; then
-
- # these ones support fnmatch patterns
- QA_EXECSTACK+=" $QA_PREBUILT"
- QA_TEXTRELS+=" $QA_PREBUILT"
- QA_WX_LOAD+=" $QA_PREBUILT"
-
- # these ones support regular expressions, so
translate
- # fnmatch patterns to regular expressions
- for x in QA_DT_NEEDED QA_FLAGS_IGNORED
QA_PRESTRIPPED QA_SONAME ; do
- if [[ $(declare -p $x 2>/dev/null) =
declare\ -a* ]] ; then
- eval "$x=(\"\${$x[@]}\"
${QA_PREBUILT//\*/.*})"
- else
- eval "$x+=\"
${QA_PREBUILT//\*/.*}\""
- fi
- done
-
- unset x
- fi
-
- # This needs to be exported since prepstrip is a
separate shell script.
- [[ -n $QA_PRESTRIPPED ]] && export QA_PRESTRIPPED
- eval "[[ -n \$QA_PRESTRIPPED_${ARCH/-/_} ]] && \
- export QA_PRESTRIPPED_${ARCH/-/_}"
fi
fi
fi
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index 042e242..0b853bf 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -524,6 +524,33 @@ __dyn_install() {
trap "__abort_install" SIGINT SIGQUIT
__start_distcc
+ # Handle setting QA_* based on QA_PREBUILT
+ # Those variables shouldn't be needed before src_install()
+ # (QA_PRESTRIPPED is used in prepstrip, others in install-qa-checks)
+ # and delay in setting them allows us to set them in pkg_setup()
+ if [[ -n $QA_PREBUILT ]] ; then
+ # these ones support fnmatch patterns
+ QA_EXECSTACK+=" $QA_PREBUILT"
+ QA_TEXTRELS+=" $QA_PREBUILT"
+ QA_WX_LOAD+=" $QA_PREBUILT"
+
+ # these ones support regular expressions, so translate
+ # fnmatch patterns to regular expressions
+ for x in QA_DT_NEEDED QA_FLAGS_IGNORED QA_PRESTRIPPED QA_SONAME
; do
+ if [[ $(declare -p $x 2>/dev/null) = declare\ -a* ]] ;
then
+ eval "$x=(\"\${$x[@]}\" ${QA_PREBUILT//\*/.*})"
+ else
+ eval "$x+=\" ${QA_PREBUILT//\*/.*}\""
+ fi
+ done
+
+ unset x
+ fi
+ # This needs to be exported since prepstrip is a separate shell script.
+ [[ -n $QA_PRESTRIPPED ]] && export QA_PRESTRIPPED
+ eval "[[ -n \$QA_PRESTRIPPED_${ARCH/-/_} ]] && \
+ export QA_PRESTRIPPED_${ARCH/-/_}"
+
__ebuild_phase pre_src_install
if ___eapi_has_prefix_variables; then