Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 30 Apr 2022 19:13:53
Message-Id: 1651346012.81f5aea4dedb55fdc18723a93ee2ba5d39b3053b.sam@gentoo
1 commit: 81f5aea4dedb55fdc18723a93ee2ba5d39b3053b
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 29 01:42:11 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 30 19:13:32 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81f5aea4
7
8 autotools.eclass: drop ROOT=/ in has_version call
9
10 Noticed when doing a read-through of the eclass (which is how I noticed
11 c8e74a7dfe477dea008548553141f083c5d03782 too).
12
13 Forcing ROOT=/ is, at best, going to confuse matters, and at worst,
14 do entirely the wrong thing. In EAPI 5 and 6, we had --host-root (which
15 we use in the eclass), and in EAPI 7+, we have -b/-d (which we use in
16 the eclass too). The ROOT= setting was there for pre-EAPI 5 times.
17
18 The aforementioned toggles (--host-root and then later on, -b/-d) are the
19 correct methods to specify (B)ROOT for has_version. Using one of those
20 with ROOT= have undefined behaviour, so drop it.
21
22 Bug: https://bugs.gentoo.org/312687
23 Thanks-to: James Le Cuirot <chewi <AT> gentoo.org>
24 Thanks-to: Ulrich Müller <ulm <AT> gentoo.org>
25 Signed-off-by: Sam James <sam <AT> gentoo.org>
26
27 eclass/autotools.eclass | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30 diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
31 index e6658e361318..b8eeb55fd8f2 100644
32 --- a/eclass/autotools.eclass
33 +++ b/eclass/autotools.eclass
34 @@ -523,7 +523,7 @@ autotools_env_setup() {
35 hv_args="-b"
36 ;;
37 esac
38 - ROOT=/ has_version ${hv_args} "=sys-devel/automake-${pv}*" && export WANT_AUTOMAKE="${pv}" && break
39 + has_version ${hv_args} "=sys-devel/automake-${pv}*" && export WANT_AUTOMAKE="${pv}" && break
40 done
41 [[ ${WANT_AUTOMAKE} == "latest" ]] && \
42 die "Cannot find the latest automake! Tried ${_LATEST_AUTOMAKE[*]}"