guix-commits
[Top][All Lists]
Advanced

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

01/01: build/glib-or-gtk-build-system: Fix 'generate-icon-cache'.


From: Federico Beffa
Subject: 01/01: build/glib-or-gtk-build-system: Fix 'generate-icon-cache'.
Date: Tue, 13 Jan 2015 08:17:05 +0000

beffa pushed a commit to branch master
in repository guix.

commit f5895dab8a99c758b2591de334e7ac3ba9eb66fb
Author: Federico Beffa <address@hidden>
Date:   Tue Jan 13 09:11:51 2015 +0100

    build/glib-or-gtk-build-system: Fix 'generate-icon-cache'.
    
    Reported by Mark H Weaver <address@hidden>
    
    * guix/build/glib-or-gtk-build-system.scm (generate-icon-cache): Add check 
for
      existence of icons directory.
---
 guix/build/glib-or-gtk-build-system.scm |   33 ++++++++++++++++---------------
 1 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/guix/build/glib-or-gtk-build-system.scm 
b/guix/build/glib-or-gtk-build-system.scm
index 2fe7aa4..a404a84 100644
--- a/guix/build/glib-or-gtk-build-system.scm
+++ b/guix/build/glib-or-gtk-build-system.scm
@@ -217,22 +217,23 @@ needed."
           ((output . directory)
            (let ((iconsdir (string-append directory
                                             "/share/icons")))
-             (with-directory-excursion iconsdir
-               (for-each
-                (lambda (dir)
-                  (unless (file-exists?
-                           (string-append iconsdir "/" dir "/"
-                                          "icon-theme.cache"))
-                    (system* "gtk-update-icon-cache"
-                             "--ignore-theme-index"
-                             (string-append iconsdir "/" dir))))
-                (scandir "."
-                         (lambda (name)
-                           (and
-                            (not (equal? name "."))
-                            (not (equal? name ".."))
-                            (equal? 'directory
-                                    (stat:type (stat name))))))))
+             (when (file-exists? iconsdir)
+               (with-directory-excursion iconsdir
+                 (for-each
+                  (lambda (dir)
+                    (unless (file-exists?
+                             (string-append iconsdir "/" dir "/"
+                                            "icon-theme.cache"))
+                      (system* "gtk-update-icon-cache"
+                               "--ignore-theme-index"
+                               (string-append iconsdir "/" dir))))
+                  (scandir "."
+                           (lambda (name)
+                             (and
+                              (not (equal? name "."))
+                              (not (equal? name ".."))
+                              (equal? 'directory
+                                      (stat:type (stat name)))))))))
              #t)))
          outputs))
 



reply via email to

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