Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 139591 - sandbox PATH weirdness
Summary: sandbox PATH weirdness
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-07 12:27 UTC by Ciaran McCreesh
Modified: 2009-02-12 07:25 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ciaran McCreesh 2006-07-07 12:27:16 UTC
Something weird with PATH appears to happen under sandbox. Simplest test case:

ciaranm@snowdrop tmp 0 0.01 $ ls -l
total 12
-rwxr-xr-x 1 ciaranm users 48 2006-07-07 20:01 test1
-rwxr-xr-x 1 ciaranm users 19 2006-07-07 20:01 test2
-rwxr-xr-x 1 ciaranm users 21 2006-07-07 20:02 test3
ciaranm@snowdrop tmp 0 0.01 $ cat test1
#!/bin/bash
 
export PATH="`pwd`/:${PATH}"
test2
ciaranm@snowdrop tmp 0 0.01 $ cat test2
#!/bin/bash
 
test3
ciaranm@snowdrop tmp 0 0.01 $ cat test3
#!/bin/bash
 
echo hi
ciaranm@snowdrop tmp 0 0.01 $ ./test1
hi
ciaranm@snowdrop tmp 0 0.01 $ sandbox ./test1
/home/users/ciaranm/tmp/test2: line 3: test3: command not found
ciaranm@snowdrop tmp 1 0.01 $

This is with:

* sys-apps/sandbox (::installed)
    installed:             1.2.18.1*
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2006-07-07 12:46:52 UTC
Can you throw in some 'echo "$0: $PATH"' lines in there please ?
Comment 2 Ciaran McCreesh 2006-07-07 12:53:18 UTC
ciaranm@snowdrop tmp 0 0.14 $ ./test1 
./test1: /home/users/ciaranm/tmp/:/home/users/ciaranm/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.4.6:/opt/intel/compiler90/bin:/opt/blackdown-jdk-1.4.2.01/bin:/opt/blackdown-jdk-1.4.2.01/jre/bin:/usr/games/bin
/home/users/ciaranm/tmp/test2: /home/users/ciaranm/tmp/:/home/users/ciaranm/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.4.6:/opt/intel/compiler90/bin:/opt/blackdown-jdk-1.4.2.01/bin:/opt/blackdown-jdk-1.4.2.01/jre/bin:/usr/games/bin
/home/users/ciaranm/tmp/test3: /home/users/ciaranm/tmp/:/home/users/ciaranm/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.4.6:/opt/intel/compiler90/bin:/opt/blackdown-jdk-1.4.2.01/bin:/opt/blackdown-jdk-1.4.2.01/jre/bin:/usr/games/bin
hi
ciaranm@snowdrop tmp 0 0.14 $ sandbox ./test1 
./test1: /home/users/ciaranm/tmp/:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.4.6:/opt/intel/compiler90/bin:/opt/blackdown-jdk-1.4.2.01/bin:/opt/blackdown-jdk-1.4.2.01/jre/bin:/usr/games/bin
/home/users/ciaranm/tmp/test2: /usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.4.6:/opt/intel/compiler90/bin:/opt/blackdown-jdk-1.4.2.01/bin:/opt/blackdown-jdk-1.4.2.01/jre/bin:/usr/games/bin
/home/users/ciaranm/tmp/test2: line 4: test3: command not found
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2006-07-07 12:57:15 UTC
Now that I think about it, probably the 'source /etc/profile' in /usr/share/sandbox/sandbox.bashrc.
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2006-07-07 12:59:14 UTC
PS, its already fixed in 1.2.20alpha1
Comment 5 Ciaran McCreesh 2006-07-07 13:01:07 UTC
Yup, that's it. Thanks.
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2006-07-07 13:07:17 UTC
Critical, or can it wait for next version ?
Comment 7 Ciaran McCreesh 2006-07-07 13:17:28 UTC
No hurry. I have a workaround in place for now. Cheers.
Comment 8 SpanKY gentoo-dev 2009-02-12 07:12:30 UTC
sandbox-1.3 is in the wild and has this fix, and the proposed test case works for me, so close this out