guix-commits
[Top][All Lists]
Advanced

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

04/04: system: /etc/profile sources each profile's /etc/profile.


From: Ludovic Courtès
Subject: 04/04: system: /etc/profile sources each profile's /etc/profile.
Date: Wed, 06 May 2015 16:31:45 +0000

civodul pushed a commit to branch master
in repository guix.

commit d9959421a54fb0f9fbb2a9016da036319b99adb9
Author: Ludovic Courtès <address@hidden>
Date:   Wed May 6 18:23:27 2015 +0200

    system: /etc/profile sources each profile's /etc/profile.
    
    Partly fixes <http://bugs.gnu.org/20255>.
    Reported by 宋文武 <address@hidden>.
    
    * gnu/system.scm (etc-directory)[profile]: Source
      /run/current-system/profile/etc/profile and
      $HOME/.guix-profile/etc/profile when available.  Move definitions of
      SSL_CERT_DIR, SSL_CERT_FILE, and GIT_SSL_CAINFO before that.
---
 gnu/system.scm |   37 +++++++++++++++++++++++++++++--------
 1 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/gnu/system.scm b/gnu/system.scm
index 609604a..104b223 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -461,14 +461,40 @@ export TZDIR=\"" tzdata "/share/zoneinfo\"
 # Tell 'modprobe' & co. where to look for modules.
 export LINUX_MODULE_DIRECTORY=/run/booted-system/kernel/lib/modules
 
-export PATH=$HOME/.guix-profile/bin:/run/current-system/profile/bin
-export PATH=/run/setuid-programs:/run/current-system/profile/sbin:$PATH
+# These variables are honored by OpenSSL (libssl) and Git.
+export SSL_CERT_DIR=/etc/ssl/certs
+export SSL_CERT_FILE=\"$SSL_CERT_DIR/ca-certificates.crt\"
+export GIT_SSL_CAINFO=\"$SSL_CERT_FILE\"
+
+# Crucial variables that could be missing the the profiles' 'etc/profile'
+# because they would require combining both profiles.
+# FIXME: See <http://bugs.gnu.org/20255>.
 export 
MANPATH=$HOME/.guix-profile/share/man:/run/current-system/profile/share/man
 export 
INFOPATH=$HOME/.guix-profile/share/info:/run/current-system/profile/share/info
-
 export 
XDG_DATA_DIRS=$HOME/.guix-profile/share:/run/current-system/profile/share
 export 
XDG_CONFIG_DIRS=$HOME/.guix-profile/etc/xdg:/run/current-system/profile/etc/xdg
 
+# Ignore the default value of 'PATH'.
+unset PATH
+
+# Load the system profile's settings.
+GUIX_PROFILE=/run/current-system/profile \\
+source /run/current-system/profile/etc/profile
+
+# Prepend setuid programs.
+export PATH=/run/setuid-programs:$PATH
+
+if [ -d \"$HOME/.guix-profile\" ]
+then
+  # Load the user profile's settings.
+  GUIX_PROFILE=\"$HOME/.guix-profile\" \\
+  source \"$HOME/.guix-profile/etc/profile\"
+else
+  # At least define this one so that basic things just work
+  # when the user installs their first package.
+  export PATH=\"$HOME/.guix-profile/bin:$PATH\"
+fi
+
 # Append the directory of 'site-start.el' to the search path.
 export EMACSLOADPATH=:/etc/emacs
 
@@ -476,11 +502,6 @@ export EMACSLOADPATH=:/etc/emacs
 # when /etc/machine-id is missing.  Make sure these warnings are non-fatal.
 export DBUS_FATAL_WARNINGS=0
 
-# These variables are honored by OpenSSL (libssl) and Git.
-export SSL_CERT_DIR=/etc/ssl/certs
-export SSL_CERT_FILE=\"$SSL_CERT_DIR/ca-certificates.crt\"
-export GIT_SSL_CAINFO=\"$SSL_CERT_FILE\"
-
 # Allow Aspell to find dictionaries installed in the user profile.
 export ASPELL_CONF=\"dict-dir $HOME/.guix-profile/lib/aspell\"
 



reply via email to

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