Am Montag, 28. Juni 2021, 15:03:59 CEST schrieb Michał Górny:
> On Mon, 2021-06-28 at 15:00 +0200, Agostino Sarubbo wrote:
> > Hello all,
> > 
> > long story short:
> > 
> > when there is a major change (new gcc, new libc, and so on), tinderbox
> > takes a lot of time to test the entire tree.
> > 
> > Let's do a practical example:
> > A new version of sys-devel/gcc is added to the tree.
> > 
> > There is no way to know how much packages compiles C/C++ code, so the
> > easiest way is compile the entire tree.
> > 
> > Instead, imagine that each ebuild declares a variable called SOURCETYPE (
> > or similar, or in metadata.xml if you prefer ) and with a tool like
> > equery/eix we are able to get the list of all packages that compiles C
> > code.
> > 
> > The same thing applies to other languages like python, ruby, go and so on
> > where compile the dev-$language category covers a lot of packages, but
> > there will be always other ebuilds that uses $language in other
> > categories.
> > 
> > What do you think?
> 
> It's a worthwhile goal but it's practically impossible to get it right.
> For example, right now we've had quite a few cases of Python ebuilds
> wrongly declaring <stabilize-allarches/>, i.e. people missing use of C
> besides Python.
> 
> That is, unless you can figure out a way for Portage to reliably detect
> SOURCETYPE and tell people what to set.

When I read this my initial idea was like that:

-if SOURCETYPE is not given it is assumed to be *, i.e. the package depends on 
any language when rebuilding much like it would be now
-if SOURCETYPE is given then tc-getcc and friends would start returning /bin/
false for every language compiler not enabled, or better just call die
-similarly CC, CXX and friends are exported to /bin/false, which should catch 
a lot of ebuilds that use the compilers without using tc-get* now

Sounds like EAPI=9 ;)

For now one could stuff this into an eclass to get the ebuilds right until 
portage actually makes use of the variable to simplify the build tree.

Eike

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to