guix-commits
[Top][All Lists]
Advanced

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

05/05: guix-install.sh: Correctly treat empty or unset $XDG_DATA_DIRS


From: guix-commits
Subject: 05/05: guix-install.sh: Correctly treat empty or unset $XDG_DATA_DIRS
Date: Sun, 26 Jan 2020 17:24:18 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 7ff169d04f52b15393b33a97959e2cd6a5957e26
Author: Alexander Krotov <address@hidden>
AuthorDate: Wed Jan 22 02:01:33 2020 +0300

    guix-install.sh: Correctly treat empty or unset $XDG_DATA_DIRS
    
    If $XDG_DATA_DIRS is unset, default value of "/usr/local/share:/usr/share"
    is used according to XDG Base Directory Specification. However,
    /etc/profile.d/guix.sh treats this value as empty list when appending its
    own directory, so after installing Guix on the system, launchers such
    as Rofi stop searching for .desktop files in /usr/share/applications/
    and can't launch applications other than those installed with Guix.
    
    This patch fixes the bug in generated /etc/profile.d/guix.sh
    
    * etc/guix-install.sh (sys_create_init_profile): Use default value of
      /usr/local/share:/usr/share/ before appending if $XDG_DATA_DIRS is not
      set.
    
    Signed-off-by: Ludovic Courtès <address@hidden>
---
 etc/guix-install.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 0e677c2..bfd3842 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -415,7 +415,7 @@ export GUIX_PROFILE GUIX_LOCPATH
 eval `guix package --search-paths=prefix 2> /dev/null`
 
 # set XDG_DATA_DIRS to include Guix installations
-export XDG_DATA_DIRS="$GUIX_PROFILE/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"
+export 
XDG_DATA_DIRS="$GUIX_PROFILE/share:${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}"
 EOF
 }
 



reply via email to

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