summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2013-01-04 20:37:35 -0800
committerZac Medico <zmedico@gentoo.org>2013-01-04 20:37:35 -0800
commit199984e45915bed2dd98f8623430fac0495b4507 (patch)
treeb2b3824421ff398dcdf7a5dde28b076cacbebd03
parent730572c343879be1c96b884c39ebb47b03d7ad70 (diff)
downloadportage-199984e45915bed2dd98f8623430fac0495b4507.tar.gz
portage-199984e45915bed2dd98f8623430fac0495b4507.tar.bz2
portage-199984e45915bed2dd98f8623430fac0495b4507.zip
Add QA_AM_MAINTAINER_MODE for bug #450278.
-rw-r--r--bin/phase-functions.sh6
-rw-r--r--man/ebuild.57
-rw-r--r--pym/portage/package/ebuild/doebuild.py27
3 files changed, 37 insertions, 3 deletions
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index 5880f83c8..01c6f556f 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Hardcoded bash lists are needed for backward compatibility with
@@ -562,6 +562,10 @@ __dyn_install() {
x=$(echo -n ${!f})
[[ -n $x ]] && echo "$x" > $f
done
+ # whitespace preserved
+ for f in QA_AM_MAINTAINER_MODE ; do
+ [[ -n ${!f} ]] && echo "${!f}" > $f
+ done
fi
echo "${USE}" > USE
echo "${EAPI:-0}" > EAPI
diff --git a/man/ebuild.5 b/man/ebuild.5
index ffc2139c2..2d0433488 100644
--- a/man/ebuild.5
+++ b/man/ebuild.5
@@ -1,4 +1,4 @@
-.TH "EBUILD" "5" "Dec 2012" "Portage VERSION" "Portage"
+.TH "EBUILD" "5" "Jan 2013" "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_AM_MAINTAINER_MODE
+This should contain a list of lines containing automake missing \-\-run
+commands. The lines 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
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 646faf44b..76f908ddd 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1616,6 +1616,29 @@ def _check_build_log(mysettings, out=None):
qa_configure_opts = "^%s$" % qa_configure_opts[0]
qa_configure_opts = re.compile(qa_configure_opts)
+ qa_am_maintainer_mode = []
+ try:
+ with io.open(_unicode_encode(os.path.join(
+ mysettings["PORTAGE_BUILDDIR"],
+ "build-info", "QA_AM_MAINTAINER_MODE"),
+ encoding=_encodings['fs'], errors='strict'),
+ mode='r', encoding=_encodings['repo.content'],
+ errors='replace') as qa_am_maintainer_mode_f:
+ qa_am_maintainer_mode = [x for x in
+ qa_am_maintainer_mode_f.read().splitlines() if x]
+ except IOError as e:
+ if e.errno not in (errno.ENOENT, errno.ESTALE):
+ raise
+
+ if qa_am_maintainer_mode:
+ if len(qa_am_maintainer_mode) > 1:
+ qa_am_maintainer_mode = \
+ "|".join("(%s)" % x for x in qa_am_maintainer_mode)
+ qa_am_maintainer_mode = "^(%s)$" % qa_am_maintainer_mode
+ else:
+ qa_am_maintainer_mode = "^%s$" % qa_am_maintainer_mode[0]
+ qa_am_maintainer_mode = re.compile(qa_am_maintainer_mode)
+
# Exclude output from dev-libs/yaz-3.0.47 which looks like this:
#
#Configuration:
@@ -1636,7 +1659,9 @@ def _check_build_log(mysettings, out=None):
for line in f:
line = _unicode_decode(line)
if am_maintainer_mode_re.search(line) is not None and \
- am_maintainer_mode_exclude_re.search(line) is None:
+ am_maintainer_mode_exclude_re.search(line) is None and \
+ (not qa_am_maintainer_mode or
+ qa_am_maintainer_mode.search(line) is None):
am_maintainer_mode.append(line.rstrip("\n"))
if bash_command_not_found_re.match(line) is not None and \