From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: man/, bin/
Date: Thu, 22 Dec 2011 23:43:05 +0000 (UTC) [thread overview]
Message-ID: <bbe1a2f0a2e4f6f611db015b17d81d6b8083e36c.zmedico@gentoo> (raw)
commit: bbe1a2f0a2e4f6f611db015b17d81d6b8083e36c
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 22 23:42:06 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Dec 22 23:42:06 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=bbe1a2f0
Share variables for CFLAGS and LDFLAGS checks.
The rationale is that any exceptions to either of these checks will
probably apply to both checks. So, QA_CFLAGS_IGNORED and QA_DT_HASH
are merged into QA_FLAGS_IGNORED, and QA_STRICT_CFLAGS_IGNORED and
QA_STRICT_DT_HASH are merged into QA_STRICT_FLAGS_IGNORED.
---
bin/misc-functions.sh | 77 ++++++++++++++++++++++++++++---------------------
man/ebuild.5 | 11 ++++---
man/make.conf.5 | 7 ++--
3 files changed, 54 insertions(+), 41 deletions(-)
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index c74b4a4..dcfdceb 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -308,6 +308,41 @@ install_qa_check() {
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.
@@ -316,25 +351,13 @@ install_qa_check() {
[[ "${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.
@@ -356,26 +379,14 @@ install_qa_check() {
# 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.
diff --git a/man/ebuild.5 b/man/ebuild.5
index 4f2f3a8..afa2731 100644
--- a/man/ebuild.5
+++ b/man/ebuild.5
@@ -602,19 +602,20 @@ This should contain a list of file paths, relative to the image directory, of
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.
diff --git a/man/make.conf.5 b/man/make.conf.5
index eff180e..8a66c21 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -814,13 +814,14 @@ settings from ebuilds. See also \fBebuild\fR(5).
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
next reply other threads:[~2011-12-22 23:43 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-22 23:43 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-08-30 17:05 [gentoo-commits] proj/portage:master commit in: man/, bin/ Zac Medico
2013-08-22 4:06 Zac Medico
2013-08-22 2:01 Zac Medico
2013-08-04 20:51 Zac Medico
2013-07-23 20:42 Arfrever Frehtes Taifersar Arahesis
2013-07-13 9:35 Arfrever Frehtes Taifersar Arahesis
2013-05-18 18:47 Zac Medico
2013-04-28 22:06 Zac Medico
2012-10-31 21:32 Zac Medico
2012-10-11 3:10 Zac Medico
2012-09-24 20:26 Zac Medico
2012-09-24 3:47 Mike Frysinger
2012-06-17 15:46 Zac Medico
2012-03-17 21:33 Zac Medico
2012-03-11 2:56 Mike Frysinger
2012-03-11 2:44 Mike Frysinger
2012-01-02 7:48 Zac Medico
2011-12-21 20:08 Zac Medico
2011-12-21 20:04 Zac Medico
2011-10-17 4:22 Zac Medico
2011-10-14 18:06 Zac Medico
2011-08-31 3:05 Zac Medico
2011-08-13 13:52 Zac Medico
2011-08-11 3:00 Zac Medico
2011-06-24 10:23 Zac Medico
2011-05-01 15:58 Zac Medico
2011-05-01 14:52 Arfrever Frehtes Taifersar Arahesis
2011-05-01 1:23 Arfrever Frehtes Taifersar Arahesis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bbe1a2f0a2e4f6f611db015b17d81d6b8083e36c.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox