mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 03:51:53 +02:00
grafts: Graft recursively.
Fixes <http://bugs.gnu.org/22139>. * guix/grafts.scm (graft-derivation): Rename to... (graft-derivation/shallow): ... this. (graft-origin-file-name, item->deriver, non-self-references) (cumulative-grafts, graft-derivation): New procedures * tests/grafts.scm ("graft-derivation, grafted item is a direct dependency"): Clarify title. Use 'grafted' instead of 'graft' to refer to the grafted derivation. ("graft-derivation, grafted item is an indirect dependency") ("graft-derivation, no dependencies on grafted output"): New tests. * guix/packages.scm (input-graft): Change to take a package instead of an input. (input-cross-graft): Likewise. (fold-bag-dependencies): New procedure. (bag-grafts): Rewrite in terms of 'fold-bag-dependencies'. * tests/packages.scm ("package-derivation, indirect grafts"): Comment out. * doc/guix.texi (Security Updates): Mention run-time dependencies and recursive grafting.
This commit is contained in:
+20
-16
@@ -605,23 +605,27 @@
|
||||
(origin (package-derivation %store dep))
|
||||
(replacement (package-derivation %store new)))))))
|
||||
|
||||
(test-assert "package-derivation, indirect grafts"
|
||||
(let* ((new (dummy-package "dep"
|
||||
(arguments '(#:implicit-inputs? #f))))
|
||||
(dep (package (inherit new) (version "0.0")))
|
||||
(dep* (package (inherit dep) (replacement new)))
|
||||
(dummy (dummy-package "dummy"
|
||||
(arguments '(#:implicit-inputs? #f))
|
||||
(inputs `(("dep" ,dep*)))))
|
||||
(guile (package-derivation %store (canonical-package guile-2.0)
|
||||
#:graft? #f)))
|
||||
(equal? (package-derivation %store dummy)
|
||||
(graft-derivation %store
|
||||
(package-derivation %store dummy #:graft? #f)
|
||||
(package-grafts %store dummy)
|
||||
;;; XXX: Nowadays 'graft-derivation' needs to build derivations beforehand to
|
||||
;;; find out about their run-time dependencies, so this test is no longer
|
||||
;;; applicable since it would trigger a full rebuild.
|
||||
;;
|
||||
;; (test-assert "package-derivation, indirect grafts"
|
||||
;; (let* ((new (dummy-package "dep"
|
||||
;; (arguments '(#:implicit-inputs? #f))))
|
||||
;; (dep (package (inherit new) (version "0.0")))
|
||||
;; (dep* (package (inherit dep) (replacement new)))
|
||||
;; (dummy (dummy-package "dummy"
|
||||
;; (arguments '(#:implicit-inputs? #f))
|
||||
;; (inputs `(("dep" ,dep*)))))
|
||||
;; (guile (package-derivation %store (canonical-package guile-2.0)
|
||||
;; #:graft? #f)))
|
||||
;; (equal? (package-derivation %store dummy)
|
||||
;; (graft-derivation %store
|
||||
;; (package-derivation %store dummy #:graft? #f)
|
||||
;; (package-grafts %store dummy)
|
||||
|
||||
;; Use the same Guile as 'package-derivation'.
|
||||
#:guile guile))))
|
||||
;; ;; Use the same Guile as 'package-derivation'.
|
||||
;; #:guile guile))))
|
||||
|
||||
(test-equal "package->bag"
|
||||
`("foo86-hurd" #f (,(package-source gnu-make))
|
||||
|
||||
Reference in New Issue
Block a user