diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-12-11 12:40:48 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-12-11 12:40:48 -0800 |
commit | 59b3da32a1417f973c7ab6767f0f8d3ccfd6d923 (patch) | |
tree | 242dffe9e5a91ddfa4dfba727de49e0ad9e0f029 /pym/portage/package | |
parent | e20cbf882cdbaae447d785ebadc980d29dfa2a4b (diff) | |
download | portage-59b3da32a1417f973c7ab6767f0f8d3ccfd6d923.tar.gz portage-59b3da32a1417f973c7ab6767f0f8d3ccfd6d923.tar.bz2 portage-59b3da32a1417f973c7ab6767f0f8d3ccfd6d923.zip |
Add QA_CONFIGURE_OPTIONS variable.v2.2.0_alpha148
Diffstat (limited to 'pym/portage/package')
-rw-r--r-- | pym/portage/package/ebuild/doebuild.py | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 880cdc476..a735ea81b 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: |