Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 583634 - OpenRC PATH is not set correctly in Prefix
Summary: OpenRC PATH is not set correctly in Prefix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-21 04:56 UTC by Benda Xu
Modified: 2016-06-14 02:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
openrc-0.20.5-prefix-PATH.patch (openrc-0.20.5-prefix-PATH.patch,1.11 KB, patch)
2016-05-21 07:03 UTC, Benda Xu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benda Xu gentoo-dev 2016-05-21 04:56:44 UTC
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.
Comment 1 Benda Xu gentoo-dev 2016-05-21 07:03:36 UTC
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
Comment 2 Benda Xu gentoo-dev 2016-05-24 01:03:52 UTC
<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.
Comment 3 Benda Xu gentoo-dev 2016-06-02 09:42:01 UTC
Ping OpenRC team.
Comment 4 Benda Xu gentoo-dev 2016-06-10 03:49:33 UTC
Ping OpenRC team.
Comment 5 William Hubbs gentoo-dev 2016-06-12 23:24:11 UTC
I'll look at this in the next day or so.
Comment 6 William Hubbs gentoo-dev 2016-06-13 23:02:33 UTC
https://github.com/openrc/openrc/commit/5af5d12

This will be in openrc-0.22 and possibly backported to 0.21.1.
Comment 7 Benda Xu gentoo-dev 2016-06-14 02:23:24 UTC
Excellent.  Thanks William!