You are not logged in.
Previous version of /etc/profile explicitly set:
PATH="/usr/local/sbin:/usr/local/bin:/usr/bin"New version uses a function to append paths:
appendpath () {
case ":$PATH:" in
*:"$1":*)
;;
*)
PATH="$PATH:$1"
esac
}
appendpath '/usr/local/sbin'
appendpath '/usr/local/bin'
appendpath '/usr/bin'However, since PATH=/usr/bin apparently on entry to profile, the final PATH value now ends up as:
/usr/bin:/usr/local/sbin:/usr/local/binwhich is different and illogical.
Any wrapper scripts placed in /usr/local/bin will not be found before the original binary in /usr/bin.
This looks like a bug; please confirm if you have also experienced this problem.
Offline
As I have nothing installed to /usr/local/bin I am not affected but I suggest you report it as a bug to clarify if the change was intentional.
Edit:
https://bugs.archlinux.org/task/56683
Last edited by loqs (2017-12-11 18:19:59)
Offline
I'm not experiencing the same problem but looking at the path ordering on my system that just means my PATH is either set to "/usr/local/bin" or "/usr/local/bin:/usr/local/sbin:/usr/bin" beforehand.
If it were empty, the order of those 3 paths would have been "/usr/local/sbin:/usr/local/bin:/usr/bin". Not sure what has set it before /etc/profile and /etc/profile.d/*.sh though.
$ printenv PATH
/usr/local/bin:/usr/local/sbin:/usr/bin:/opt/cuda/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perlOffline
Not sure what has set it before /etc/profile and /etc/profile.d/*.sh though.
The shell zsh
% echo $PATH
/usr/binbash
$ echo $PATH
/usr/local/bin:/usr/bin:/binOffline
The shell is what I thought first as well but neither of those values would result in the PATH on my system.. I'll probably look into this later, now I'm curious ![]()
Offline
The shell is what I thought first as well but neither of those values would result in the PATH on my system.. I'll probably look into this later, now I'm curious
Yes it would. You said in the shells thread that you use zsh. So zsh starts it with /usr/bin. Then /usr/local/sbin is prepended followed by /usr/local/bin (also prepended) but /usr/bin is skipped as it was already there. This if followed by everything in /etc/profile.d/ which append to the PATH, which would result in precisely the PATH value you shared in your previous post.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
So zsh starts it with /usr/bin.
I've had a quick look around my filesystem and as far as I can tell, /usr/bin comes from login.defs. I can't find anything in the zsh configs setting a PATH value.
Is it hard-coded?
Then /usr/local/sbin is prepended followed by /usr/local/bin (also prepended) but /usr/bin is skipped as it was already there.
Where would these be prepended? /etc/profile is appendpathing these to PATH, not prepending them.
Hence me thinking there must still be something else in-between, otherwise I'd end up with the same path as the OP, with /usr/bin first.
Last edited by Omar007 (2017-12-11 20:20:03)
Offline
Oops, you're right, I misread the /etc/profile. I thought (despite the function name) that it was prepending in the function.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline