all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alexander Krotov <krotov@iitp.ru>
To: 39231@debbugs.gnu.org
Cc: Alexander Krotov <krotov@iitp.ru>
Subject: [bug#39231] [PATCH] guix-install.sh: Correctly treat empty or unset $XDG_DATA_DIRS
Date: Wed, 22 Jan 2020 02:01:33 +0300	[thread overview]
Message-ID: <20200121230133.12958-1-krotov@iitp.ru> (raw)

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

             reply	other threads:[~2020-01-21 23:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21 23:01 Alexander Krotov [this message]
2020-01-26 22:20 ` bug#39231: [PATCH] guix-install.sh: Correctly treat empty or unset $XDG_DATA_DIRS Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200121230133.12958-1-krotov@iitp.ru \
    --to=krotov@iitp.ru \
    --cc=39231@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.