[issue11946] 2.7.1 'test_commands' build test fails
Jason Vas Dias
report at bugs.python.org
Sat Apr 30 18:06:11 CEST 2011
Jason Vas Dias <jason.vas.dias at gmail.com> added the comment:
Oops, thought there may be gotchas to that multi-arch python wrapper -
it wasn't quoting its arguments properly - here is now what I have as
/usr/bin/python :
$ cat python
#!/bin/bash
ME=$0
ME=${ME##*/}
VERSION=${ME#python}
VERSION=${VERSION:-2.7}
ARCH=`uname -m`
CMD=''
case $ARCH in
i686)
CMD="/usr/bin/32/${ME}"
;;
*)
CMD="/usr/bin/python${VERSION}.bin"
;;
esac
for((a=1;a<=$#;a++));do CMD="${CMD} '"$(eval 'echo -n "$'$a'"')"' ";done
eval "exec $CMD"
I had to move the /usr/bin/python${VERSION} executables to
/usr/bin/python${VERSION}.bin , and replace them with copies
of this python script (which runs whichever version it is named by).
And I can do:
$ python -c 'import os
import sys
import commands
print commands.getstatus("ls -ld /.")
'
drwxr-xr-x. 25 root root 4096 Apr 20 15:28 /.
under both the native x86_64 and a 'setarch i686' environment with
the same results.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11946>
_______________________________________
More information about the Python-bugs-list
mailing list