packages: 'package-grafts' trims native inputs.
commit91c9b5d016ac8bed127557d378c70fbc56cec0e5
authorLudovic Courtès <ludo@gnu.org>
Tue, 5 Dec 2017 15:32:40 +0000 (5 16:32 +0100)
committerLudovic Courtès <ludo@gnu.org>
Tue, 5 Dec 2017 15:32:40 +0000 (5 16:32 +0100)
tree5f2b318d1a857f647406504b69f4122f072eb34a
parentf3e3f4d934ee0ecd71f5c73a57252ed1d0bad88e
packages: 'package-grafts' trims native inputs.

'package-grafts' returns a list of potentially applicable grafts, which
'cumulative-grafts' then narrows by looking at store item references and
determining the subset of the grafts that's actually applicable.

Until now, 'package-grafts' would traverse native inputs and would thus
return a large superset of the applicable grafts, since native inputs
are not in the reference graph by definition.  This patch fixes that by
having 'package-grafts' ignore entirely native inputs from the
dependency graph.

* guix/packages.scm (fold-bag-dependencies)[bag-direct-inputs*]: Add
special case for libc.
* guix/packages.scm (bag-grafts)[native-grafts, target-grafts]: Remove.
[grafts]: New procedure.
Use it.
* tests/packages.scm ("package-grafts, grafts of native inputs
ignored"): New test.
guix/packages.scm
tests/packages.scm