summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-10-10 20:07:01 -0700
committerZac Medico <zmedico@gentoo.org>2012-10-10 20:08:08 -0700
commit55ab494c406947d67ba7d54208b4cd5e981db579 (patch)
tree57b8d7bc600b1a5e48efd8f40c6f7f893aaeecca /bin
parent2d163053ee47a349b7e50c0907b89bcd91bef7d3 (diff)
downloadportage-55ab494c406947d67ba7d54208b4cd5e981db579.tar.gz
portage-55ab494c406947d67ba7d54208b4cd5e981db579.tar.bz2
portage-55ab494c406947d67ba7d54208b4cd5e981db579.zip
Add QA_MULTILIB_PATHS for bug #437910.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/misc-functions.sh34
1 files changed, 27 insertions, 7 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 7db6676a0..4a1c46dc3 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -783,21 +783,41 @@ install_qa_check() {
[[ -x /usr/bin/file && -x /usr/bin/find ]] && \
[[ -n ${MULTILIB_STRICT_DIRS} && -n ${MULTILIB_STRICT_DENY} ]]
then
- local abort=no dir file firstrun=yes
+ rm -f "${T}/multilib-strict.log"
+ local abort=no dir file
MULTILIB_STRICT_EXEMPT=$(echo ${MULTILIB_STRICT_EXEMPT} | sed -e 's:\([(|)]\):\\\1:g')
for dir in ${MULTILIB_STRICT_DIRS} ; do
[[ -d ${ED}/${dir} ]] || continue
for file in $(find ${ED}/${dir} -type f | grep -v "^${ED}/${dir}/${MULTILIB_STRICT_EXEMPT}"); do
if file ${file} | egrep -q "${MULTILIB_STRICT_DENY}" ; then
- if [[ ${firstrun} == yes ]] ; then
- echo "Files matching a file type that is not allowed:"
- firstrun=no
- fi
- abort=yes
- echo " ${file#${ED}//}"
+ echo "${file#${ED}//}" >> "${T}/multilib-strict.log"
fi
done
done
+
+ if [[ -s ${T}/multilib-strict.log ]] ; then
+ if [[ ${#QA_MULTILIB_PATHS[@]} -eq 1 ]] ; then
+ local shopts=$-
+ set -o noglob
+ QA_MULTILIB_PATHS=(${QA_MULTILIB_PATHS})
+ set +o noglob
+ set -${shopts}
+ fi
+ if [ "${QA_STRICT_MULTILIB_PATHS-unset}" = unset ] ; then
+ for x in "${QA_MULTILIB_PATHS[@]}" ; do
+ sed -e "s#^${x#/}\$##" -i "${T}/multilib-strict.log"
+ done
+ sed -e "/^\$/d" -i "${T}/multilib-strict.log"
+ fi
+ if [[ -s ${T}/multilib-strict.log ]] ; then
+ abort=yes
+ echo "Files matching a file type that is not allowed:"
+ while read -r ; do
+ echo " ${REPLY}"
+ done < "${T}/multilib-strict.log"
+ fi
+ fi
+
[[ ${abort} == yes ]] && die "multilib-strict check failed!"
fi