packages: 'package-grafts' returns grafts for all the relevant outputs.
authorLudovic Courtès <ludo@gnu.org>
Thu, 11 Jun 2020 16:24:59 +0000 (18:24 +0200)
committerLudovic Courtès <ludo@gnu.org>
Thu, 11 Jun 2020 17:05:05 +0000 (19:05 +0200)
commit03a70e4c190420e87c0b535285caf8f77260d4ff
treedbf3f3952af4990b959e048b1ae2766c1fc83ffa
parentcbd9581acc41cd49eb81c2432452cad4de805cbd
packages: 'package-grafts' returns grafts for all the relevant outputs.

Fixes <https://bugs.gnu.org/41796>.
Reported by Jakub Kądziołka <kuba@kadziolka.net>.

* guix/packages.scm (input-graft): Add 'output' parameter and honor it.
Add OUTPUT to the cache key.
(input-cross-graft): Likewise.
(fold-bag-dependencies): Operate on inputs instead of nodes.  Turn
VISITED into a vhash instead of a set.  Pass PROC HEAD and OUTPUT
instead of just HEAD.
(bag-grafts): Adjust accordingly.
* tests/packages.scm ("package-grafts, dependency on several outputs"):
New test.
guix/packages.scm
tests/packages.scm