Here is a test script. It print the elements of PATH that are prefixed by EPREFIX. $ cat path-test EPREFIX=/disk/usr100/gentoo status() { local IFS=":" for p in $PATH; do case $p in $EPREFIX*) echo $p ;; *) ;; esac done } Reproducible: Always Steps to Reproduce: With openrc-0.19.1 intree, $ openrc-run path-test status /disk/usr100/gentoo-legacy/lib64/rc/sbin /disk/usr100/gentoo-legacy/lib64/rc/bin /disk/usr100/gentoo-legacy/bin /disk/usr100/gentoo-legacy/sbin /disk/usr100/gentoo-legacy/usr/bin /disk/usr100/gentoo-legacy/opt/bin /disk/usr100/gentoo-legacy/usr/sbin /disk/usr100/gentoo-legacy/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.2 But with openrc-0.20.4, $ openrc-run path-test status /disk/usr100/gentoo-legacy/lib64/rc/sbin /disk/usr100/gentoo-legacy/lib64/rc/bin /disk/usr100/gentoo-legacy/bin /disk/usr100/gentoo-legacy/sbin /disk/usr100/gentoo-legacy/opt/bin /disk/usr100/gentoo-legacy/usr/sbin /disk/usr100/gentoo-legacy/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.2 Actual Results: /disk/usr100/gentoo-legacy/usr/bin is missing with openrc-0.20.4.
Created attachment 434828 [details, diff] openrc-0.20.5-prefix-PATH.patch This patch fixes PATH on Gentoo Prefix. commit 039f4c9a838e90a3d14a023bfa545c35ccbb6a90 Author: Benda Xu <heroxbd@gentoo.org> Date: Sat May 21 15:38:48 2016 +0900 Fix PATH for Prefix. 1. remove default /bin:/sbin:/usr/bin:/usr/sbin 2. PKG_PREFIX should be defaulted to $(PREFIX)/usr 3. LOCAL_PREFIX should be defaulted to $(PREFIX)/usr/local
<whubbs> heroxbd: I'm curious why you moved the includes around in os.mk? <heroxbd> whubbs: Hi. Because of "PKG_PREFIX?=$(PREFIX)/usr". In os-Linux.mk, for example, PKG_PREFIX?=/usr. Including os-prefix.mk first ensures the first PKG_PREFIX?= is evaluated.
Ping OpenRC team.
I'll look at this in the next day or so.
https://github.com/openrc/openrc/commit/5af5d12 This will be in openrc-0.22 and possibly backported to 0.21.1.
Excellent. Thanks William!