1 |
commit: 92652c0d1fb8fa36f2a7bfa005a1a88684ee69e3 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 26 09:10:47 2011 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 26 09:10:47 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=92652c0d |
7 |
|
8 |
Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix |
9 |
|
10 |
|
11 |
bin/misc-functions.sh | 157 +++++++++++++++++++++----------------- |
12 |
bin/repoman | 8 +- |
13 |
man/ebuild.5 | 2 +- |
14 |
man/make.conf.5 | 6 +- |
15 |
pym/_emerge/AbstractPollTask.py | 4 +- |
16 |
pym/_emerge/FakeVartree.py | 1 + |
17 |
pym/_emerge/depgraph.py | 4 +- |
18 |
pym/portage/const.py | 1 + |
19 |
pym/portage/dbapi/vartree.py | 15 ++++- |
20 |
pym/portage/repository/config.py | 4 +- |
21 |
pym/portage/xpak.py | 2 +- |
22 |
11 files changed, 118 insertions(+), 86 deletions(-) |
23 |
|
24 |
diff --cc bin/misc-functions.sh |
25 |
index 436a50b,5a726b3..c6e66c2 |
26 |
mode 100644,100755..100644 |
27 |
--- a/bin/misc-functions.sh |
28 |
+++ b/bin/misc-functions.sh |
29 |
@@@ -155,10 -152,92 +155,94 @@@ install_qa_check() |
30 |
[[ " ${FEATURES} " == *" force-prefix "* ]] || \ |
31 |
case "$EAPI" in 0|1|2) local ED=${D} ;; esac |
32 |
|
33 |
- cd "${ED}" || die "cd failed" |
34 |
+ # PREFIX LOCAL: ED needs not to exist, whereas D does |
35 |
+ cd "${D}" || die "cd failed" |
36 |
+ # END PREFIX LOCAL |
37 |
|
38 |
+ # Merge QA_FLAGS_IGNORED and QA_DT_HASH into a single array, since |
39 |
+ # QA_DT_HASH is deprecated. |
40 |
+ qa_var="QA_FLAGS_IGNORED_${ARCH/-/_}" |
41 |
+ eval "[[ -n \${!qa_var} ]] && QA_FLAGS_IGNORED=(\"\${${qa_var}[@]}\")" |
42 |
+ if [[ ${#QA_FLAGS_IGNORED[@]} -eq 1 ]] ; then |
43 |
+ local shopts=$- |
44 |
+ set -o noglob |
45 |
+ QA_FLAGS_IGNORED=(${QA_FLAGS_IGNORED}) |
46 |
+ set +o noglob |
47 |
+ set -${shopts} |
48 |
+ fi |
49 |
+ |
50 |
+ qa_var="QA_DT_HASH_${ARCH/-/_}" |
51 |
+ eval "[[ -n \${!qa_var} ]] && QA_DT_HASH=(\"\${${qa_var}[@]}\")" |
52 |
+ if [[ ${#QA_DT_HASH[@]} -eq 1 ]] ; then |
53 |
+ local shopts=$- |
54 |
+ set -o noglob |
55 |
+ QA_DT_HASH=(${QA_DT_HASH}) |
56 |
+ set +o noglob |
57 |
+ set -${shopts} |
58 |
+ fi |
59 |
+ |
60 |
+ if [[ -n ${QA_DT_HASH} ]] ; then |
61 |
+ QA_FLAGS_IGNORED=("${QA_FLAGS_IGNORED[@]}" "${QA_DT_HASH[@]}") |
62 |
+ unset QA_DT_HASH |
63 |
+ fi |
64 |
+ |
65 |
+ # Merge QA_STRICT_FLAGS_IGNORED and QA_STRICT_DT_HASH, since |
66 |
+ # QA_STRICT_DT_HASH is deprecated |
67 |
+ if [ "${QA_STRICT_FLAGS_IGNORED-unset}" = unset ] && \ |
68 |
+ [ "${QA_STRICT_DT_HASH-unset}" != unset ] ; then |
69 |
+ QA_STRICT_FLAGS_IGNORED=1 |
70 |
+ unset QA_STRICT_DT_HASH |
71 |
+ fi |
72 |
+ |
73 |
+ # Check for files built without respecting *FLAGS. Note that |
74 |
+ # -frecord-gcc-switches must be in all *FLAGS variables, in |
75 |
+ # order to avoid false positive results here. |
76 |
+ # NOTE: This check must execute before prepall/prepstrip, since |
77 |
+ # prepstrip strips the .GCC.command.line sections. |
78 |
+ if type -P scanelf > /dev/null && ! has binchecks ${RESTRICT} && \ |
79 |
+ [[ "${CFLAGS}" == *-frecord-gcc-switches* ]] && \ |
80 |
+ [[ "${CXXFLAGS}" == *-frecord-gcc-switches* ]] && \ |
81 |
+ [[ "${FFLAGS}" == *-frecord-gcc-switches* ]] && \ |
82 |
+ [[ "${FCFLAGS}" == *-frecord-gcc-switches* ]] ; then |
83 |
+ rm -f "${T}"/scanelf-ignored-CFLAGS.log |
84 |
+ for x in $(scanelf -qyRF '%k %p' -k \!.GCC.command.line "${ED}" | \ |
85 |
+ sed -e "s:\!.GCC.command.line ::") ; do |
86 |
+ # Separate out file types that are known to support |
87 |
+ # .GCC.command.line sections, using the `file` command |
88 |
+ # similar to how prepstrip uses it. |
89 |
+ f=$(file "${x}") || continue |
90 |
+ [[ -z ${f} ]] && continue |
91 |
+ if [[ ${f} == *"SB executable"* || |
92 |
+ ${f} == *"SB shared object"* ]] ; then |
93 |
+ echo "${x}" >> "${T}"/scanelf-ignored-CFLAGS.log |
94 |
+ fi |
95 |
+ done |
96 |
+ |
97 |
+ if [[ -f "${T}"/scanelf-ignored-CFLAGS.log ]] ; then |
98 |
+ |
99 |
+ if [ "${QA_STRICT_FLAGS_IGNORED-unset}" = unset ] ; then |
100 |
+ for x in "${QA_FLAGS_IGNORED[@]}" ; do |
101 |
+ sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-CFLAGS.log |
102 |
+ done |
103 |
+ fi |
104 |
+ # Filter anything under /usr/lib/debug/ in order to avoid |
105 |
+ # duplicate warnings for splitdebug files. |
106 |
+ sed -e "s#^usr/lib/debug/.*##" -e "/^\$/d" -e "s#^#/#" \ |
107 |
+ -i "${T}"/scanelf-ignored-CFLAGS.log |
108 |
+ f=$(<"${T}"/scanelf-ignored-CFLAGS.log) |
109 |
+ if [[ -n ${f} ]] ; then |
110 |
+ vecho -ne '\n' |
111 |
+ eqawarn "${BAD}QA Notice: Files built without respecting CFLAGS have been detected${NORMAL}" |
112 |
+ eqawarn " Please include the following list of files in your report:" |
113 |
+ eqawarn "${f}" |
114 |
+ vecho -ne '\n' |
115 |
+ sleep 1 |
116 |
+ else |
117 |
+ rm -f "${T}"/scanelf-ignored-CFLAGS.log |
118 |
+ fi |
119 |
+ fi |
120 |
+ fi |
121 |
+ |
122 |
export STRIP_MASK |
123 |
prepall |
124 |
has "${EAPI}" 0 1 2 3 || prepcompress |
125 |
@@@ -189,41 -268,8 +273,41 @@@ |
126 |
sleep 1 |
127 |
fi |
128 |
|
129 |
+ # PREFIX LOCAL: |
130 |
+ # anything outside the prefix should be caught by the Prefix QA |
131 |
+ # check, so if there's nothing in ED, we skip searching for QA |
132 |
+ # checks there, the specific QA funcs can hence rely on ED existing |
133 |
+ if [[ -d ${ED} ]] ; then |
134 |
+ case ${CHOST} in |
135 |
+ *-darwin*) |
136 |
+ # Mach-O platforms (NeXT, Darwin, OSX) |
137 |
+ install_qa_check_macho |
138 |
+ ;; |
139 |
+ *-interix*|*-winnt*) |
140 |
+ # PECOFF platforms (Windows/Interix) |
141 |
+ install_qa_check_pecoff |
142 |
+ ;; |
143 |
+ *-aix*) |
144 |
+ # XCOFF platforms (AIX) |
145 |
+ install_qa_check_xcoff |
146 |
+ ;; |
147 |
+ *) |
148 |
+ # because this is the majority: ELF platforms (Linux, |
149 |
+ # Solaris, *BSD, IRIX, etc.) |
150 |
+ install_qa_check_elf |
151 |
+ ;; |
152 |
+ esac |
153 |
+ fi |
154 |
+ |
155 |
+ # this is basically here such that the diff with trunk remains just |
156 |
+ # offsetted and not out of order |
157 |
+ install_qa_check_misc |
158 |
+ # END PREFIX LOCAL |
159 |
+} |
160 |
+ |
161 |
+install_qa_check_elf() { |
162 |
if type -P scanelf > /dev/null && ! has binchecks ${RESTRICT}; then |
163 |
- local qa_var insecure_rpath=0 tmp_quiet=${PORTAGE_QUIET} |
164 |
+ local insecure_rpath=0 tmp_quiet=${PORTAGE_QUIET} |
165 |
local x |
166 |
|
167 |
# display warnings when using stricter because we die afterwards |