guix-commits
[Top][All Lists]
Advanced

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

03/04: profiles: Don't assume all the inputs are of a package are packag


From: Ludovic Courtès
Subject: 03/04: profiles: Don't assume all the inputs are of a package are packages.
Date: Wed, 27 May 2015 20:38:30 +0000

civodul pushed a commit to branch master
in repository guix.

commit 102f7101b965be55ef1f80e80eec127a982b20a1
Author: Ludovic Courtès <address@hidden>
Date:   Wed May 27 22:31:56 2015 +0200

    profiles: Don't assume all the inputs are of a package are packages.
    
    Reported by Ricardo Wurmus.
    
    * guix/profiles.scm 
(gtk-icon-themes)[entry-lookup-gtk+](find-among-packages):
      Rename to...
      (find-among-inputs): ... this.  Check whether INPUT is a package before
      calling 'package-name'.  Fixes a regression introduced in b04af0e.
---
 guix/profiles.scm |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index aaf6933..c2cf1bf 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -595,10 +595,11 @@ creates the GTK+ 'icon-theme.cache' file for each theme."
   ;; Return as a monadic value the GTK+ package or store path referenced by the
   ;; manifest ENTRY, or #f if not referenced.
   (define (entry-lookup-gtk+ entry)
-    (define (find-among-packages packages)
-      (find (lambda (package)
-              (equal? "gtk+" (package-name package)))
-            packages))
+    (define (find-among-inputs inputs)
+      (find (lambda (input)
+              (and (package? input)
+                   (string=? "gtk+" (package-name input))))
+            inputs))
 
     (define (find-among-store-items items)
       (find (lambda (item)
@@ -615,8 +616,8 @@ creates the GTK+ 'icon-theme.cache' file for each theme."
       (match (manifest-entry-item entry)
         ((? package? package)
          (match (package-transitive-inputs package)
-           (((labels packages . _) ...)
-            (return (find-among-packages packages)))))
+           (((labels inputs . _) ...)
+            (return (find-among-inputs inputs)))))
         ((? string? item)
          (mlet %store-monad ((refs (references* item)))
            (return (find-among-store-items refs)))))))



reply via email to

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