Subject: Re: [bug#57717] [DRAFT PATCH core-updates] build-systems: Pass #:allowed-references and #:disallowed-references to builders.

From: Maxime Devos <[email-masked]>
Date: Sat, 10 Sep 2022 18:27:03 +0200

On 10-09-2022 17:26, Marius Bakke wrote:
> This way we don't have to build the list of disallowed references twice,
> which is difficult without labels in the case of e.g. `(,glib "bin").
> 
> Note: I implemented a variant of this approach using a let-binding in
> f0114656876dcf2e09874e4ea0c00cacf31f1bb2, perhaps that is "good enough"
> as this approach is unlikely to be much used.
> 
> WDYT?  I'll implement this for the remaining build systems if this is at
> all sane.

A caveat with using #:disallowed-references this way -- AFAIK, it is 
undocumented whether #:disallowed-references goes for a native build or 
a cross-build.  The intention is to stop the (natively-)compiled 
python-some-testing-library from appearing in the wrappers, stopping a 
cross-compiled python-some-testing-library.

Depending on what, exactly, the behaviour of #:disallowed-references is, 
it may be necessary to ‘override’ whether to disallow the native- or the 
cross-version.

To do so, I used 'gexp-input' with #:native? #true in (gnu packages 
glib) (maybe that was unnecessary, but I was thinking better be explicit 
than implicit here ...).

An alternative solution could be to split #:disallowed-reference in two, 
e.g. #:disallowed-references/system and #:disallowed-references/target, 
to prevent accidents.

Greetings,
Maxime.