Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Zac Medico <zmedico@g.o>
Subject: [gentoo-portage-dev] [PATCH] multilib-strict: disable recursion into subdirectories (bug 424423)
Date: Tue, 01 Aug 2017 05:22:36
Message-Id: 20170801051903.25950-1-zmedico@gentoo.org
1 Disable recursion into subdirectories, in order to avoid false-positives.
2 The MULTILIB_STRICT_EXEMPT variable only served to filter false-positives
3 that were triggered by recursion, so it will no longer be needed.
4
5 X-Gentoo-bug: 424423
6 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=424423
7 ---
8 bin/install-qa-check.d/80multilib-strict | 7 +++----
9 1 file changed, 3 insertions(+), 4 deletions(-)
10
11 diff --git a/bin/install-qa-check.d/80multilib-strict b/bin/install-qa-check.d/80multilib-strict
12 index f944be9e6..21fe93d4b 100644
13 --- a/bin/install-qa-check.d/80multilib-strict
14 +++ b/bin/install-qa-check.d/80multilib-strict
15 @@ -6,14 +6,13 @@ multilib_strict_check() {
16 then
17 rm -f "${T}/multilib-strict.log"
18 local abort=no dir file
19 - MULTILIB_STRICT_EXEMPT=$(echo ${MULTILIB_STRICT_EXEMPT} | sed -e 's:\([(|)]\):\\\1:g')
20 for dir in ${MULTILIB_STRICT_DIRS} ; do
21 [[ -d ${ED}/${dir} ]] || continue
22 - for file in $(find ${ED}/${dir} -type f | grep -v "^${ED}/${dir}/${MULTILIB_STRICT_EXEMPT}"); do
23 - if file ${file} | egrep -q "${MULTILIB_STRICT_DENY}" ; then
24 + while read -r -d '' file; do
25 + if file "${file}" | egrep -q "${MULTILIB_STRICT_DENY}" ; then
26 echo "${file#${ED}//}" >> "${T}/multilib-strict.log"
27 fi
28 - done
29 + done < <(find "${ED}/${dir}" -maxdepth 1 -type f -print0)
30 done
31
32 if [[ -s ${T}/multilib-strict.log ]] ; then
33 --
34 2.13.0