Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] ebuild.sh: Explicitly ban get_libdir in global scope
Date: Wed, 30 Aug 2017 20:31:27
Message-Id: 1504125080.6710.0.camel@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] ebuild.sh: Explicitly ban get_libdir in global scope by Zac Medico
1 W dniu śro, 30.08.2017 o godzinie 10∶48 -0700, użytkownik Zac Medico
2 napisał:
3 > On 08/30/2017 02:06 AM, Michał Górny wrote:
4 > > The value of get_libdir depends on the profile, and so it is not useful
5 > > for dependency calculations. Furthermore, it seems that Portage does
6 > > not handle defining it in global scope well due to EAPI checking magic.
7 > > Ban it completely where it is defined as EAPI function to let developers
8 > > catch their mistakes early rather than see them as 'command not found'
9 > > errors during dependency calculation / cache updates.
10 > >
11 > > Bug: https://bugs.gentoo.org/629010
12 > > ---
13 > > bin/ebuild.sh | 1 +
14 > > 1 file changed, 1 insertion(+)
15 > >
16 > > diff --git a/bin/ebuild.sh b/bin/ebuild.sh
17 > > index a400ef72e..f1ac3f278 100755
18 > > --- a/bin/ebuild.sh
19 > > +++ b/bin/ebuild.sh
20 > > @@ -66,6 +66,7 @@ else
21 > > use useq usev use_with use_enable"
22 > > ___eapi_has_usex && funcs+=" usex"
23 > > ___eapi_has_in_iuse && funcs+=" in_iuse"
24 > > + ___eapi_has_get_libdir && funcs+=" get_libdir"
25 > > # These functions die because calls to them during the "depend" phase
26 > > # are considered to be severe QA violations.
27 > > funcs+=" best_version has_version portageq"
28 > >
29 >
30 > It's possible that there are working ebuilds that call get_libdir in
31 > global scope. Have we done an analysis of the ebuilds in the gentoo
32 > repository? Obviously, it would be safer to call eqawarn.
33
34 If there were any (more), we'd have caught them during cache regen,
35 wouldn't we? When I accidentally left it when bumping to EAPI 6, I've
36 got a bug report almost immediately.
37
38 --
39 Best regards,
40 Michał Górny

Replies