Add QA_AM_MAINTAINER_MODE for bug #450278.
authorZac Medico <zmedico@gentoo.org>
Sat, 5 Jan 2013 04:37:35 +0000 (20:37 -0800)
committerZac Medico <zmedico@gentoo.org>
Sat, 5 Jan 2013 04:37:35 +0000 (20:37 -0800)
bin/phase-functions.sh
man/ebuild.5
pym/portage/package/ebuild/doebuild.py

index 5880f83c8cee9d459baaa8c0f14cbb00d2849c82..01c6f556ffb0532161c5a92de71989c5a5e9c364 100644 (file)
@@ -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
index ffc2139c283a1ac0f48628d66ff0871df46b52de..2d04334889fbdde7f30bb83b97e79f06339b260e 100644 (file)
@@ -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
index 646faf44bea62557a4ee0ad5311ce97c7d7553ff..76f908ddd370c08247018659b552e89d3ea374c1 100644 (file)
@@ -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 \