Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Sun, 20 Dec 2015 17:37:52
Message-Id: 1450633020.5ac36c898da7ad5924d976adfc8b002c0fd378d2.mgorny@gentoo
1 commit: 5ac36c898da7ad5924d976adfc8b002c0fd378d2
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 6 19:46:13 2015 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 20 17:37:00 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=5ac36c89
7
8 Move QA_PREBUILT handling into src_install()
9
10 Delay QA_PREBUILT handling until src_install(), to allow setting it in
11 phase function like pkg_setup(). This shouldn't cause any issues since
12 the resulting variables are not used before install.
13
14 Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>
15
16 bin/ebuild.sh | 25 -------------------------
17 bin/phase-functions.sh | 27 +++++++++++++++++++++++++++
18 2 files changed, 27 insertions(+), 25 deletions(-)
19
20 diff --git a/bin/ebuild.sh b/bin/ebuild.sh
21 index 4319a17..f1586b2 100755
22 --- a/bin/ebuild.sh
23 +++ b/bin/ebuild.sh
24 @@ -704,31 +704,6 @@ if ! has "$EBUILD_PHASE" clean cleanrm ; then
25
26 [[ -n $CCACHE_SIZE ]] && ccache -M $CCACHE_SIZE &> /dev/null
27 fi
28 -
29 - if [[ -n $QA_PREBUILT ]] ; then
30 -
31 - # these ones support fnmatch patterns
32 - QA_EXECSTACK+=" $QA_PREBUILT"
33 - QA_TEXTRELS+=" $QA_PREBUILT"
34 - QA_WX_LOAD+=" $QA_PREBUILT"
35 -
36 - # these ones support regular expressions, so translate
37 - # fnmatch patterns to regular expressions
38 - for x in QA_DT_NEEDED QA_FLAGS_IGNORED QA_PRESTRIPPED QA_SONAME ; do
39 - if [[ $(declare -p $x 2>/dev/null) = declare\ -a* ]] ; then
40 - eval "$x=(\"\${$x[@]}\" ${QA_PREBUILT//\*/.*})"
41 - else
42 - eval "$x+=\" ${QA_PREBUILT//\*/.*}\""
43 - fi
44 - done
45 -
46 - unset x
47 - fi
48 -
49 - # This needs to be exported since prepstrip is a separate shell script.
50 - [[ -n $QA_PRESTRIPPED ]] && export QA_PRESTRIPPED
51 - eval "[[ -n \$QA_PRESTRIPPED_${ARCH/-/_} ]] && \
52 - export QA_PRESTRIPPED_${ARCH/-/_}"
53 fi
54 fi
55 fi
56
57 diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
58 index 042e242..0b853bf 100644
59 --- a/bin/phase-functions.sh
60 +++ b/bin/phase-functions.sh
61 @@ -524,6 +524,33 @@ __dyn_install() {
62 trap "__abort_install" SIGINT SIGQUIT
63 __start_distcc
64
65 + # Handle setting QA_* based on QA_PREBUILT
66 + # Those variables shouldn't be needed before src_install()
67 + # (QA_PRESTRIPPED is used in prepstrip, others in install-qa-checks)
68 + # and delay in setting them allows us to set them in pkg_setup()
69 + if [[ -n $QA_PREBUILT ]] ; then
70 + # these ones support fnmatch patterns
71 + QA_EXECSTACK+=" $QA_PREBUILT"
72 + QA_TEXTRELS+=" $QA_PREBUILT"
73 + QA_WX_LOAD+=" $QA_PREBUILT"
74 +
75 + # these ones support regular expressions, so translate
76 + # fnmatch patterns to regular expressions
77 + for x in QA_DT_NEEDED QA_FLAGS_IGNORED QA_PRESTRIPPED QA_SONAME ; do
78 + if [[ $(declare -p $x 2>/dev/null) = declare\ -a* ]] ; then
79 + eval "$x=(\"\${$x[@]}\" ${QA_PREBUILT//\*/.*})"
80 + else
81 + eval "$x+=\" ${QA_PREBUILT//\*/.*}\""
82 + fi
83 + done
84 +
85 + unset x
86 + fi
87 + # This needs to be exported since prepstrip is a separate shell script.
88 + [[ -n $QA_PRESTRIPPED ]] && export QA_PRESTRIPPED
89 + eval "[[ -n \$QA_PRESTRIPPED_${ARCH/-/_} ]] && \
90 + export QA_PRESTRIPPED_${ARCH/-/_}"
91 +
92 __ebuild_phase pre_src_install
93
94 if ___eapi_has_prefix_variables; then