emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#39231: closed ([PATCH] guix-install.sh: Correctly treat empty or uns


From: GNU bug Tracking System
Subject: bug#39231: closed ([PATCH] guix-install.sh: Correctly treat empty or unset $XDG_DATA_DIRS)
Date: Sun, 26 Jan 2020 22:22:01 +0000

Your message dated Sun, 26 Jan 2020 23:20:55 +0100
with message-id <address@hidden>
and subject line Re: [bug#39231] [PATCH] guix-install.sh: Correctly treat empty 
or unset $XDG_DATA_DIRS
has caused the debbugs.gnu.org bug report #39231,
regarding [PATCH] guix-install.sh: Correctly treat empty or unset $XDG_DATA_DIRS
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
39231: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39231
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] guix-install.sh: Correctly treat empty or unset $XDG_DATA_DIRS Date: Wed, 22 Jan 2020 02:01:33 +0300
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.
---
 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 b57d71981f..da781d41ff 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -409,7 +409,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
 }
 
-- 
2.25.0




--- End Message ---
--- Begin Message --- Subject: Re: [bug#39231] [PATCH] guix-install.sh: Correctly treat empty or unset $XDG_DATA_DIRS Date: Sun, 26 Jan 2020 23:20:55 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
Hi,

Alexander Krotov <address@hidden> skribis:

> 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.

Good catch.  Applied, thanks!

Ludo’.


--- End Message ---

reply via email to

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