Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: checking properties in ebuilds and eclasses
Date: Mon, 18 May 2020 19:42:55
Message-Id: ec5a041983da254c8c546f1c8329455169897da4.camel@gentoo.org
In Reply to: [gentoo-dev] rfc: checking properties in ebuilds and eclasses by William Hubbs
1 On Mon, 2020-05-18 at 13:35 -0500, William Hubbs wrote:
2 > All,
3 >
4 > I would like to start a discussion on checking the PROPERTIES value in
5 > ebuilds. Specifically this could be used to check for live ebuilds
6 > instead of assuming that the version number of an ebuild indicates
7 > whether the ebuild is live.
8
9 Why would an ebuild have to check whether the ebuild is live? Isn't it
10 supposed to know that by definition?
11
12 > The up side of this would be that we aren't reserving a specific version
13 > number for live ebuilds.
14
15 We aren't.
16
17 > The down side that is being pointed out to me right now is that
18 > we would need a function like in_iuse, but called in_properties, to
19 > check the properties. We would need something like this because
20 > properties supports use conditionals, e.g.
21 > PROPERTIES="foo? ( bar )"
22
23 No, that's not why we needed in_iuse. We need IUSE because IUSE is
24 stacked and there's no guarantee that its value will be correct (or even
25 present) at an arbitrary time during ebuild execution.
26
27 in_iuse does not handle USE conditionals because obviously there are
28 none in IUSE.
29
30 PROPERTIES isn't stacked at the moment but there is a proposition to
31 make it stacked in EAPI 8 for better consistency. Right now it is easy
32 to wrongly assume it is stacked and accidentally override it.
33
34 --
35 Best regards,
36 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] rfc: checking properties in ebuilds and eclasses William Hubbs <williamh@g.o>