aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-10-11 03:07:01 (GMT)
committerZac Medico <zmedico@gentoo.org>2012-10-11 03:08:08 (GMT)
commit55ab494c406947d67ba7d54208b4cd5e981db579 (patch)
tree57b8d7bc600b1a5e48efd8f40c6f7f893aaeecca
parentPollScheduler: fix _schedule() to return True (diff)
downloadportage-55ab494c406947d67ba7d54208b4cd5e981db579.zip
portage-55ab494c406947d67ba7d54208b4cd5e981db579.tar.gz
portage-55ab494c406947d67ba7d54208b4cd5e981db579.tar.bz2
Add QA_MULTILIB_PATHS for bug #437910.
-rwxr-xr-xbin/misc-functions.sh34
-rw-r--r--man/ebuild.57
-rw-r--r--man/make.conf.56
3 files changed, 38 insertions, 9 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 7db6676..4a1c46d 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
diff --git a/man/ebuild.5 b/man/ebuild.5
index 0d5e448..cca00dd 100644
--- a/man/ebuild.5
+++ b/man/ebuild.5
@@ -1,4 +1,4 @@
-.TH "EBUILD" "5" "Sep 2012" "Portage VERSION" "Portage"
+.TH "EBUILD" "5" "Oct 2012" "Portage VERSION" "Portage"
.SH "NAME"
ebuild \- the internal format, variables, and functions in an ebuild script
@@ -760,6 +760,11 @@ The paths may contain regular expressions with escape\-quoted special characters
This variable is intended to be used on files of binary packages which ignore
CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, and LDFLAGS variables.
.TP
+.B QA_MULTILIB_PATHS
+This should contain a list of file paths, relative to the image directory, of
+files that should be ignored for the multilib\-strict checks.
+The paths may contain regular expressions with escape\-quoted special characters.
+.TP
.B QA_PRESTRIPPED
This should contain a list of file paths, relative to the image directory, of
files that contain pre-stripped binaries. The paths may contain regular
diff --git a/man/make.conf.5 b/man/make.conf.5
index 61daa90..0f5bd54 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -1,4 +1,4 @@
-.TH "MAKE.CONF" "5" "Sep 2012" "Portage VERSION" "Portage"
+.TH "MAKE.CONF" "5" "Oct 2012" "Portage VERSION" "Portage"
.SH "NAME"
make.conf \- custom settings for Portage
.SH "SYNOPSIS"
@@ -895,6 +895,10 @@ settings from ebuilds. See also \fBebuild\fR(5).
Set this to cause portage to ignore any \fIQA_FLAGS_IGNORED\fR override
settings from ebuilds. See also \fBebuild\fR(5).
.TP
+\fBQA_STRICT_MULTILIB_PATHS = \fI"set"\fR
+Set this to cause portage to ignore any \fIQA_MULTILIB_PATHS\fR override
+settings from ebuilds. See also \fBebuild\fR(5).
+.TP
\fBQA_STRICT_PRESTRIPPED = \fI"set"\fR
Set this to cause portage to ignore any \fIQA_PRESTRIPPED\fR override
settings from ebuilds. See also \fBebuild\fR(5).