From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id ACE1B1381F3 for ; Tue, 11 Dec 2012 20:42:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7510721C0DE; Tue, 11 Dec 2012 20:42:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AF25F21C0DF for ; Tue, 11 Dec 2012 20:42:34 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7B40333DBB0 for ; Tue, 11 Dec 2012 20:42:33 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 18AAAE543C for ; Tue, 11 Dec 2012 20:42:32 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1355258448.59b3da32a1417f973c7ab6767f0f8d3ccfd6d923.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: man/, pym/portage/package/ebuild/, bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/phase-functions.sh man/ebuild.5 pym/portage/package/ebuild/doebuild.py X-VCS-Directories: man/ pym/portage/package/ebuild/ bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 59b3da32a1417f973c7ab6767f0f8d3ccfd6d923 X-VCS-Branch: master Date: Tue, 11 Dec 2012 20:42:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 073d2216-fd0d-4b4e-ad71-35ca2086699e X-Archives-Hash: 27f8e7f7bee1187a96a9b810adf9780e commit: 59b3da32a1417f973c7ab6767f0f8d3ccfd6d923 Author: Zac Medico gentoo org> AuthorDate: Tue Dec 11 20:40:48 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Dec 11 20:40:48 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=59b3da32 Add QA_CONFIGURE_OPTIONS variable. --- bin/phase-functions.sh | 3 +- man/ebuild.5 | 7 +++++- pym/portage/package/ebuild/doebuild.py | 33 ++++++++++++++++++++++++++++--- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh index 9de9436..5880f83 100644 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@ -557,7 +557,8 @@ __dyn_install() { if [[ $CATEGORY != virtual ]] ; then for f in ASFLAGS CBUILD CC CFLAGS CHOST CTARGET CXX \ CXXFLAGS EXTRA_ECONF EXTRA_EINSTALL EXTRA_MAKE \ - LDFLAGS LIBCFLAGS LIBCXXFLAGS QA_DESKTOP_FILE ; do + LDFLAGS LIBCFLAGS LIBCXXFLAGS QA_CONFIGURE_OPTIONS \ + QA_DESKTOP_FILE ; do x=$(echo -n ${!f}) [[ -n $x ]] && echo "$x" > $f done diff --git a/man/ebuild.5 b/man/ebuild.5 index cca00dd..0045efd 100644 --- a/man/ebuild.5 +++ b/man/ebuild.5 @@ -1,4 +1,4 @@ -.TH "EBUILD" "5" "Oct 2012" "Portage VERSION" "Portage" +.TH "EBUILD" "5" "Dec 2012" "Portage VERSION" "Portage" .SH "NAME" ebuild \- the internal format, variables, and functions in an ebuild script @@ -781,6 +781,11 @@ shared libraries that have SONAMEs but should not have a corresponding SONAME symlink in the same directory. The paths may contain regular expressions with escape\-quoted special characters. .TP +.B QA_CONFIGURE_OPTIONS +This should contain a list of configure options which trigger warnings about +unrecognized options. The options may contain regular expressions with +escape\-quoted special characters. +.TP .B QA_DT_NEEDED This should contain a list of file paths, relative to the image directory, of shared libraries that lack NEEDED entries. The paths may contain regular diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 880cdc4..a735ea8 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -1579,7 +1579,29 @@ def _check_build_log(mysettings, out=None): configure_opts_warn = [] configure_opts_warn_re = re.compile( - r'^configure: WARNING: [Uu]nrecognized options: ') + r'^configure: WARNING: [Uu]nrecognized options: (.*)') + + qa_configure_opts = "" + try: + with io.open(_unicode_encode(os.path.join( + mysettings["PORTAGE_BUILDDIR"], + "build-info", "QA_CONFIGURE_OPTIONS"), + encoding=_encodings['fs'], errors='strict'), + mode='r', encoding=_encodings['repo.content'], + errors='replace') as qa_configure_opts_f: + qa_configure_opts = qa_configure_opts_f.read() + except IOError as e: + if e.errno not in (errno.ENOENT, errno.ESTALE): + raise + + qa_configure_opts = qa_configure_opts.split() + if qa_configure_opts: + if len(qa_configure_opts) > 1: + qa_configure_opts = "|".join("(%s)" % x for x in qa_configure_opts) + qa_configure_opts = "^(%s)$" % qa_configure_opts + else: + qa_configure_opts = "^%s$" % qa_configure_opts[0] + qa_configure_opts = re.compile(qa_configure_opts) # Exclude output from dev-libs/yaz-3.0.47 which looks like this: # @@ -1611,8 +1633,11 @@ def _check_build_log(mysettings, out=None): if helper_missing_file_re.match(line) is not None: helper_missing_file.append(line.rstrip("\n")) - if configure_opts_warn_re.match(line) is not None: - configure_opts_warn.append(line.rstrip("\n")) + m = configure_opts_warn_re.match(line) + if m is not None: + for x in m.group(1).split(", "): + if not qa_configure_opts or qa_configure_opts.match(x) is None: + configure_opts_warn.append(x) if make_jobserver_re.match(line) is not None: make_jobserver.append(line.rstrip("\n")) @@ -1661,7 +1686,7 @@ def _check_build_log(mysettings, out=None): if configure_opts_warn: msg = [_("QA Notice: Unrecognized configure options:")] msg.append("") - msg.extend("\t" + line for line in configure_opts_warn) + msg.extend("\t%s" % x for x in configure_opts_warn) _eqawarn(msg) if make_jobserver: