sleep 1
fi
+ # Merge QA_FLAGS_IGNORED and QA_DT_HASH into a single array, since
+ # QA_DT_HASH is deprecated.
+ qa_var="QA_FLAGS_IGNORED_${ARCH/-/_}"
+ eval "[[ -n \${!qa_var} ]] && QA_FLAGS_IGNORED=(\"\${${qa_var}[@]}\")"
+ if [[ ${#QA_FLAGS_IGNORED[@]} -eq 1 ]] ; then
+ local shopts=$-
+ set -o noglob
+ QA_FLAGS_IGNORED=(${QA_FLAGS_IGNORED})
+ set +o noglob
+ set -${shopts}
+ fi
+
+ qa_var="QA_DT_HASH_${ARCH/-/_}"
+ eval "[[ -n \${!qa_var} ]] && QA_DT_HASH=(\"\${${qa_var}[@]}\")"
+ if [[ ${#QA_DT_HASH[@]} -eq 1 ]] ; then
+ local shopts=$-
+ set -o noglob
+ QA_DT_HASH=(${QA_DT_HASH})
+ set +o noglob
+ set -${shopts}
+ fi
+
+ if [[ -n ${QA_DT_HASH} ]] ; then
+ QA_FLAGS_IGNORED=("${QA_FLAGS_IGNORED[@]}" "${QA_DT_HASH[@]}")
+ unset QA_DT_HASH
+ fi
+
+ # Merge QA_STRICT_FLAGS_IGNORED and QA_STRICT_DT_HASH, since
+ # QA_STRICT_DT_HASH is deprecated
+ if [ "${QA_STRICT_FLAGS_IGNORED-unset}" = unset ] && \
+ [ "${QA_STRICT_DT_HASH-unset}" != unset ] ; then
+ QA_STRICT_FLAGS_IGNORED=1
+ unset QA_STRICT_DT_HASH
+ fi
+
# Check for files built without respecting *FLAGS. Note that
# -frecord-gcc-switches must be in all *FLAGS variables, in
# order to avoid false positive results here.
[[ "${FFLAGS}" == *-frecord-gcc-switches* ]] && \
[[ "${FCFLAGS}" == *-frecord-gcc-switches* ]] && \
! has binchecks ${RESTRICT} ; then
- qa_var="QA_CFLAGS_IGNORED_${ARCH/-/_}"
- eval "[[ -n \${!qa_var} ]] && QA_CFLAGS_IGNORED=(\"\${${qa_var}[@]}\")"
f=$(scanelf -qyRF '%k %p' -k \!.GCC.command.line "${ED}" | sed -e "s:\!.GCC.command.line ::")
if [[ -n ${f} ]] ; then
echo "${f}" > "${T}"/scanelf-ignored-CFLAGS.log
- if [ "${QA_STRICT_CFLAGS_IGNORED-unset}" == unset ] ; then
- if [[ ${#QA_CFLAGS_IGNORED[@]} -gt 1 ]] ; then
- for x in "${QA_CFLAGS_IGNORED[@]}" ; do
- sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-CFLAGS.log
- done
- else
- local shopts=$-
- set -o noglob
- for x in ${QA_CFLAGS_IGNORED} ; do
- sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-CFLAGS.log
- done
- set +o noglob
- set -${shopts}
- fi
+ if [ "${QA_STRICT_FLAGS_IGNORED-unset}" = unset ] ; then
+ for x in "${QA_FLAGS_IGNORED[@]}" ; do
+ sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-CFLAGS.log
+ done
fi
# Filter anything under /usr/lib/debug/ in order to avoid
# duplicate warnings for splitdebug files.
# Check for files built without respecting LDFLAGS
if [[ "${LDFLAGS}" == *,--hash-style=gnu* ]] && \
- ! has binchecks ${RESTRICT} ; then
- qa_var="QA_DT_HASH_${ARCH/-/_}"
- eval "[[ -n \${!qa_var} ]] && QA_DT_HASH=(\"\${${qa_var}[@]}\")"
+ ! has binchecks ${RESTRICT} ; then
f=$(scanelf -qyRF '%k %p' -k .hash "${ED}" | sed -e "s:\.hash ::")
if [[ -n ${f} ]] ; then
echo "${f}" > "${T}"/scanelf-ignored-LDFLAGS.log
- if [ "${QA_STRICT_DT_HASH-unset}" == unset ] ; then
- if [[ ${#QA_DT_HASH[@]} -gt 1 ]] ; then
- for x in "${QA_DT_HASH[@]}" ; do
- sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-LDFLAGS.log
- done
- else
- local shopts=$-
- set -o noglob
- for x in ${QA_DT_HASH} ; do
- sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-LDFLAGS.log
- done
- set +o noglob
- set -${shopts}
- fi
+ if [ "${QA_STRICT_FLAGS_IGNORED-unset}" = unset ] ; then
+ for x in "${QA_FLAGS_IGNORED[@]}" ; do
+ sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-LDFLAGS.log
+ done
fi
# Filter anything under /usr/lib/debug/ in order to avoid
# duplicate warnings for splitdebug files.
files that contain writable and executable segments. These are rare.
The paths may contain fnmatch patterns.
.TP
-\fBQA_CFLAGS_IGNORED\fR
+\fBQA_FLAGS_IGNORED\fR
This should contain a list of file paths, relative to the image directory, of
-files that do not contain .GCC.command.line sections. The paths may contain
-regular expressions with escape\-quoted special characters.
+files that do not contain .hash or .GCC.command.line sections. The paths may
+contain regular expressions with escape\-quoted special characters.
.br
This variable is intended to be used on files of binary packages which ignore
-CFLAGS, CXXFLAGS, FFLAGS, and FCFLAGS variables.
+CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, and LDFLAGS variables.
.TP
.TP
\fBQA_DT_HASH\fR
This should contain a list of file paths, relative to the image directory, of
files that contain .hash sections. The paths may contain regular expressions
-with escape\-quoted special characters.
+with escape\-quoted special characters. This variable is deprecated. Use
+\fBQA_FLAGS_IGNORED\f instead.
.br
This variable is intended to be used on files of binary packages which ignore
LDFLAGS variable.
Set this to cause portage to ignore any \fIQA_TEXTREL\fR override
settings from ebuilds. See also \fBebuild\fR(5).
.TP
-\fBQA_STRICT_CFLAGS_IGNORED = \fI"set"\fR
-Set this to cause portage to ignore any \fIQA_CFLAGS_IGNORED\fR override
+\fBQA_STRICT_FLAGS_IGNORED = \fI"set"\fR
+Set this to cause portage to ignore any \fIQA_FLAGS_IGNORED\fR override
settings from ebuilds. See also \fBebuild\fR(5).
.TP
\fBQA_STRICT_DT_HASH = \fI"set"\fR
Set this to cause portage to ignore any \fIQA_DT_HASH\fR override
-settings from ebuilds. See also \fBebuild\fR(5).
+settings from ebuilds. This variable is deprecated. Use
+\fIQA_STRICT_FLAGS_IGNORED\fR instead.
.TP
\fBQA_STRICT_PRESTRIPPED = \fI"set"\fR
Set this to cause portage to ignore any \fIQA_PRESTRIPPED\fR override