Re: PATH being ignored on SLES 10 with Jenkins ver. 1.466.2

2013-05-24 Thread Johannes Wienke
Hi,

On 05/21/2013 07:47 AM, rusty wrote:
 I am running into an interesting problem with jenkins on SLES 10.4.  I have 
 two different python versions installed because I need python2.6 and not 
 2.4 for portability reasons that are not important.
 Obviosly, I set up path variables on the machine so that jenkins would 
 build using python2.6 and not 2.4 I have set a node variable
 PATH 
 /usr/local/bin/python:/usr/local/bin/:$PATH:/usr/local/bin/python:/usr/local/bin/
 I have set the .bashrc file
 I have set the /etc/profile
 yet the path returned, even after a machine restart,disconnect-reconnect or 
 both, jenkins always returns the path...
 PATH /usr/bin:/bin:/usr/sbin:/sbin
 But running a simple job of :
 import os
 import sys
 print sys.executable
 print os.getenv(PATH, None)
 print sys.path
 import automate
 Returns
 
 *23:11:38* [sysn0t4] $ python /tmp/hudson3083762089535439523.py*23:11:38* 
 /usr/local/bin/python*23:11:38* 
 /usr/local/bin/python:/usr/local/bin/:/usr/local/bin/python:/usr/local/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin/python:/usr/local/bin/:/usr/local/bin/python:/usr/local/bin/*23:11:38*
  ['/tmp', '/usr/lib/python24.zip', '/usr/lib64/python2.4', 
 '/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk', 
 '/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages',
 
 
 What on earth is going on  acording to the path returned. 
 /usr/local/bin/python (python2.6) should have been found first, but it 
 isn't.  How do I insert python 2.6 onto the path correctly?

I have just experienced the same issue with a Mac salve. I couldn't
figure out the reason, but a workaround is to define the PATH variable
in the jenkins configuration for that slave (environment variables
section) with the correct entries. This is automatically propagated to
all jobs on that slave then. You can even reuse the existing path like
foo:${PATH}.

Cheers,
Johannes



signature.asc
Description: OpenPGP digital signature


PATH being ignored on SLES 10 with Jenkins ver. 1.466.2

2013-05-20 Thread rusty
I am running into an interesting problem with jenkins on SLES 10.4.  I have 
two different python versions installed because I need python2.6 and not 
2.4 for portability reasons that are not important.
Obviosly, I set up path variables on the machine so that jenkins would 
build using python2.6 and not 2.4 I have set a node variable
PATH 
/usr/local/bin/python:/usr/local/bin/:$PATH:/usr/local/bin/python:/usr/local/bin/
I have set the .bashrc file
I have set the /etc/profile
yet the path returned, even after a machine restart,disconnect-reconnect or 
both, jenkins always returns the path...
PATH /usr/bin:/bin:/usr/sbin:/sbin
But running a simple job of :
import os
import sys
print sys.executable
print os.getenv(PATH, None)
print sys.path
import automate
Returns

*23:11:38* [sysn0t4] $ python /tmp/hudson3083762089535439523.py*23:11:38* 
/usr/local/bin/python*23:11:38* 
/usr/local/bin/python:/usr/local/bin/:/usr/local/bin/python:/usr/local/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin/python:/usr/local/bin/:/usr/local/bin/python:/usr/local/bin/*23:11:38*
 ['/tmp', '/usr/lib/python24.zip', '/usr/lib64/python2.4', 
'/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk', 
'/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages',


What on earth is going on  acording to the path returned. 
/usr/local/bin/python (python2.6) should have been found first, but it 
isn't.  How do I insert python 2.6 onto the path correctly?

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.