Gentoo Archives: gentoo-portage-dev

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

Replies