guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: commencement: 'guile-final' is now "hidden".


From: Ludovic Courtès
Subject: 02/02: gnu: commencement: 'guile-final' is now "hidden".
Date: Thu, 28 Jul 2016 16:55:45 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit 386b71d1b961a52201f64591076e51487a87bf0b
Author: Ludovic Courtès <address@hidden>
Date:   Thu Jul 28 18:53:13 2016 +0200

    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.
---
 gnu/packages/commencement.scm |    4 +++-
 tests/packages.scm            |   14 ++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index c52b6e8..54b524a 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -685,8 +685,10 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a 
\"address@hidden"~%"
     ,@(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)))
diff --git a/tests/packages.scm b/tests/packages.scm
index 7c9ad05..e9c8690 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -749,6 +749,20 @@
                        r))
                  #f))
 
+(test-assert "fold-packages, hidden package"
+  ;; There are two public variables providing "address@hidden" ('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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]