GNU bug report logs -
#65062
[PATCH core-updates] packages: Lookup inputs by specification.
Previous Next
Full log
View this message in rfc822 format
Hi,
Hilton Chain <hako <at> ultrarare.space> skribis:
>> Hilton Chain <hako <at> ultrarare.space> skribis:
>>
>> > * guix/packages.scm (add-input-label): Specify output when it's not "out".
>>
>> [...]
>>
>> > + (list (string-append (package-name package) ":" output)
>> > + package
>> > + output)))
>>
>> The Grand Plan¹ is to eventually get rid of labels entirely (or almost:
>> there’d still be input alists on the build side). As such, I thought we
>> shouldn’t worry too much about what the actual label is. But perhaps
>> you stumbled upon situations where this is a problem? Could you
>> describe them?
[...]
> My main concern is that currently modify-inputs, this-package-input
> and this-package-native-input operate on input labels and there would
> be duplicated labels if adding multiple outputs of a package.
>
> For modify-inputs, I think there's no approach to solve this without
> also specifying labels in inputs.
Yes, good point.
Another, more radical approach, would be to change semantics, whereby
(inputs (list p)) would mean that all the outputs of ‘p’, not just
“out”, are taken as inputs. That’d simplify inputs at the expense of
precision, and (this-package-input NAME) would always be unambiguous.
But maybe that’s too radical and uncertain.
So all things considered, I guess you’re right and we should do what you
propose.
Minor issues:
> --- a/guix/packages.scm
> +++ b/guix/packages.scm
> @@ -626,7 +626,13 @@ (define (add-input-label input)
> ((? package? package)
> (list (package-name package) package))
> (((? package? package) output) ;XXX: ugly?
> - (list (package-name package) package output))
> + (if (string=? output "out")
> + ;; (package "out") => ("package" package "out")
> + (list (package-name package) package output)
> + ;; (package "output") => ("package:output" package "output")
> + (list (string-append (package-name package) ":" output)
> + package
> + output)))
Rather write it as two separate clauses, without comments:
(((? package? package) "out")
…)
(((? package? package) output)
…)
Could you also add a test case in ‘tests/packages.scm’ that would look
up inputs by those labels?
Thanks,
Ludo’.
This bug report was last modified 1 year and 178 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.