Gentoo Archives: gentoo-dev

From: Rolf Eike Beer <eike@×××××××.de>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Declare the type of source
Date: Mon, 28 Jun 2021 15:42:56
Message-Id: 4339154.LvFx2qVVIh@daneel.sf-tec.de
In Reply to: Re: [gentoo-dev] Declare the type of source by "Michał Górny"
1 Am Montag, 28. Juni 2021, 15:03:59 CEST schrieb Michał Górny:
2 > On Mon, 2021-06-28 at 15:00 +0200, Agostino Sarubbo wrote:
3 > > Hello all,
4 > >
5 > > long story short:
6 > >
7 > > when there is a major change (new gcc, new libc, and so on), tinderbox
8 > > takes a lot of time to test the entire tree.
9 > >
10 > > Let's do a practical example:
11 > > A new version of sys-devel/gcc is added to the tree.
12 > >
13 > > There is no way to know how much packages compiles C/C++ code, so the
14 > > easiest way is compile the entire tree.
15 > >
16 > > Instead, imagine that each ebuild declares a variable called SOURCETYPE (
17 > > or similar, or in metadata.xml if you prefer ) and with a tool like
18 > > equery/eix we are able to get the list of all packages that compiles C
19 > > code.
20 > >
21 > > The same thing applies to other languages like python, ruby, go and so on
22 > > where compile the dev-$language category covers a lot of packages, but
23 > > there will be always other ebuilds that uses $language in other
24 > > categories.
25 > >
26 > > What do you think?
27 >
28 > It's a worthwhile goal but it's practically impossible to get it right.
29 > For example, right now we've had quite a few cases of Python ebuilds
30 > wrongly declaring <stabilize-allarches/>, i.e. people missing use of C
31 > besides Python.
32 >
33 > That is, unless you can figure out a way for Portage to reliably detect
34 > SOURCETYPE and tell people what to set.
35
36 When I read this my initial idea was like that:
37
38 -if SOURCETYPE is not given it is assumed to be *, i.e. the package depends on
39 any language when rebuilding much like it would be now
40 -if SOURCETYPE is given then tc-getcc and friends would start returning /bin/
41 false for every language compiler not enabled, or better just call die
42 -similarly CC, CXX and friends are exported to /bin/false, which should catch
43 a lot of ebuilds that use the compilers without using tc-get* now
44
45 Sounds like EAPI=9 ;)
46
47 For now one could stuff this into an eclass to get the ebuilds right until
48 portage actually makes use of the variable to simplify the build tree.
49
50 Eike

Attachments

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