On Tue, Sep 27, 2011 at 03:32:13PM -0700, Ethan Jackson wrote:
> --- a/tests/atlocal.in
> +++ b/tests/atlocal.in
> @@ -9,3 +9,8 @@ export PYTHONPATH
>
> PYTHONIOENCODING=utf_8
> export PYTHONIOENCODING
> +
> +if [ $HAVE_PYTHON ] && [ 'python -m argparse' ] ;
In shell, [ <string> ] is true if <string> is nonempty. $HAVE_PYTHON
expands to either "yes" or "no", so this won't have the desired
effect:
blp@hardrock:~$ [ "yes" ]; echo $?
0
blp@hardrock:~$ [ "no" ]; echo $?
0
Similarly, [ 'python -m argparse' ] will always be true, because the
string is nonempty.
I think you want this:
if test $HAVE_PYTHON = yes; then
if python -m argparse 2>/dev/null; then
:
else
PYTHONPATH=$PYTHONPATH:$abs_top_srcdir/python/compat
export PYTHONPATH
fi
fi
The other changes are because ! and export var=value aren't portable.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev