mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
gnu: commencement: 'guile-final' is now "hidden".
This way, we no longer have this annoying warning: $ guix build guile -n guix build: warning: ambiguous package specification `guile' guix build: warning: choosing guile-2.0.11 from gnu/packages/guile.scm:128:2 * gnu/packages/commencement.scm (guile-final): Use 'hidden-package'. * tests/packages.scm ("fold-packages, hidden package"): New test.
This commit is contained in:
parent
6980511b73
commit
386b71d1b9
2 changed files with 17 additions and 1 deletions
|
@ -685,8 +685,10 @@ (define %boot4-inputs
|
|||
,@(alist-delete "bash" %boot3-inputs)))
|
||||
|
||||
(define-public guile-final
|
||||
;; This package must be public because other modules refer to it. However,
|
||||
;; mark it as hidden so that 'fold-packages' ignores it.
|
||||
(package-with-bootstrap-guile
|
||||
(package-with-explicit-inputs guile-2.0/fixed
|
||||
(package-with-explicit-inputs (hidden-package guile-2.0/fixed)
|
||||
%boot4-inputs
|
||||
(current-source-location)
|
||||
#:guile %bootstrap-guile)))
|
||||
|
|
|
@ -749,6 +749,20 @@ (define read-at
|
|||
r))
|
||||
#f))
|
||||
|
||||
(test-assert "fold-packages, hidden package"
|
||||
;; There are two public variables providing "guile@2.0" ('guile-final' in
|
||||
;; commencement.scm and 'guile-2.0/fixed' in guile.scm), but only the latter
|
||||
;; should show up.
|
||||
(match (fold-packages (lambda (p r)
|
||||
(if (and (string=? (package-name p) "guile")
|
||||
(string-prefix? "2.0"
|
||||
(package-version p)))
|
||||
(cons p r)
|
||||
r))
|
||||
'())
|
||||
((one)
|
||||
(eq? one guile-2.0/fixed))))
|
||||
|
||||
(test-assert "find-packages-by-name"
|
||||
(match (find-packages-by-name "hello")
|
||||
(((? (cut eq? hello <>))) #t)
|
||||
|
|
Loading…
Reference in a new issue