guix-commits
[Top][All Lists]
Advanced

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

01/01: profiles: Deal with non-directory items in share/icons.


From: Ludovic Courtès
Subject: 01/01: profiles: Deal with non-directory items in share/icons.
Date: Thu, 28 May 2015 12:41:28 +0000

civodul pushed a commit to branch master
in repository guix.

commit 1ba4796d135ba7a07f2e89126fba673601c321c2
Author: Ludovic Courtès <address@hidden>
Date:   Thu May 28 14:38:50 2015 +0200

    profiles: Deal with non-directory items in share/icons.
    
    Reported by Mark H Weaver <address@hidden>.
    
    * guix/profiles.scm (gtk-icon-themes)[build]: Check whether DIR is a 
directory
      before calling 'ensure-writable-directory'.
---
 guix/profiles.scm |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index 0f73455..28150af 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -649,9 +649,12 @@ creates the GTK+ 'icon-theme.cache' file for each theme."
             ;; Update the 'icon-theme.cache' file for each icon theme.
             (for-each
              (lambda (theme)
-               (let ((dir (string-append #$output "/share/icons/" theme)))
-                 (ensure-writable-directory dir)
-                 (system* update-icon-cache "-t" dir)))
+               (let ((dir (string-append destdir "/" theme)))
+                 ;; Occasionally DESTDIR contains plain files, such as
+                 ;; "abiword_48.png".  Ignore these.
+                 (when (file-is-directory? dir)
+                   (ensure-writable-directory dir)
+                   (system* update-icon-cache "-t" dir))))
              (scandir destdir (negate (cut member <> '("." ".."))))))))
 
     ;; Don't run the hook when there's nothing to do.



reply via email to

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