aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2024-06-16 20:12:29 -0400
committerSam James <sam@gentoo.org>2024-06-17 01:20:41 +0100
commit11c51d7c78f48d4c9842e0d475c26b7068f18c3e (patch)
tree7e72adc44b7f4323769b03a558e7218a67d29a1a
parentbin/ebuild.sh: disable globskipdots too in Bash 5.2 (diff)
downloadportage-11c51d7c78f48d4c9842e0d475c26b7068f18c3e.tar.gz
portage-11c51d7c78f48d4c9842e0d475c26b7068f18c3e.tar.bz2
portage-11c51d7c78f48d4c9842e0d475c26b7068f18c3e.zip
ebuild: fix maintainer mode checks to work with modern autotools
Modern autotools does not use the --run argument to "missing", so the check essentially never ever ever ever fired anywhere. The GNU "missing" script is actually allowed to be run by any software at all, so checking for "missing --run" was always wrong. Indeed, there are some packages which use it for their own purposes and added suppressions for this FP. The correct solution really is to check for *maintainer mode* by checking whether *maintainer* programs are run (via "missing"). This also means we get to check for specific programs which autotools.eclass would be capable of handling, and don't need to arbitrarily exclude stuff like help2man (???) which makes things somewhat simpler. It should be noted that I have observed 3 scenarios for the missing script to be run via: - the missing script is surrounded by single quotes, followed by the unquoted command - the missing script is unquoted, and is followed by the unquoted command - legacy: the missing script is unquoted and is followed by --run We have to handle all three cases via a regex group. Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--lib/portage/package/ebuild/doebuild.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/portage/package/ebuild/doebuild.py b/lib/portage/package/ebuild/doebuild.py
index 6641cd834..21ff5a77f 100644
--- a/lib/portage/package/ebuild/doebuild.py
+++ b/lib/portage/package/ebuild/doebuild.py
@@ -2382,10 +2382,10 @@ def _check_build_log(mysettings, out=None):
#
# Configuration:
# Automake: ${SHELL} /var/tmp/portage/dev-libs/yaz-3.0.47/work/yaz-3.0.47/config/missing --run automake-1.10
- am_maintainer_mode_re = re.compile(r"/missing --run ")
- am_maintainer_mode_exclude_re = re.compile(
- r"(/missing --run (autoheader|autotest|help2man|makeinfo)|^\s*Automake:\s)"
+ am_maintainer_mode_re = re.compile(
+ r"/missing( --run|'|) (automake|autoconf|autoheader|aclocal)"
)
+ am_maintainer_mode_exclude_re = re.compile(r"^\s*Automake:\s")
make_jobserver_re = re.compile(r"g?make\[\d+\]: warning: jobserver unavailable:")
make_jobserver = []