base-files: preserve PATH preset by environment

This delta aligns the value of `PATH` variable with other
shells/distros, which in their default configuration preserve
(append) the old value.
For instance: https://src.fedoraproject.org/rpms/bash/blob/master/f/dot-bashrc#_9.

In order to exercise interoperability with Win32 applications
in WSL, the subsystem process injects Windows environment's
PATH to the Linux OS, which in this case gets lost.

closes #6233

Co-authored-by: maxice8 <thinkabit.ukim@gmail.com>
This commit is contained in:
Adeel 2018-12-27 04:15:36 +02:00 committed by maxice8
parent d63b03f25b
commit 20c06e3b0a
No known key found for this signature in database
GPG Key ID: 543B9D4F4299F06B
2 changed files with 18 additions and 2 deletions

View File

@ -2,8 +2,24 @@
# System wide environment and startup programs.
appendpath () {
case ":$PATH:" in
*:"$1":*)
;;
*)
PATH="${PATH:+$PATH:}$1"
esac
}
# Set our default path (/usr/sbin:/sbin:/bin included for non-Void chroots)
PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin"
appendpath '/usr/local/sbin'
appendpath '/usr/local/bin'
appendpath '/usr/bin'
appendpath '/usr/sbin'
appendpath '/sbin'
appendpath '/bin'
unset appendpath
export PATH
# Set default umask

View File

@ -1,7 +1,7 @@
# Template file for 'base-files'
pkgname=base-files
version=0.140
revision=2
revision=3
bootstrap=yes
depends="xbps-triggers"
short_desc="Void Linux base system files"