﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
13401	[v30] configure script uses wrong logic operator on result of  test is_python3	jgmiller	Stuart Auchterlonie	"The configure script allows setting the python executable path with --python=path_to_specific_version

The configure script tests the python executable at line 6956

# Check for python dependencies
if enabled bindings_python; then
    is_python3                 && python=python2

The is_python3 function tests the python version with

    check_cmd $python << EOF
import sys
if sys.version_info > (3,0):
    sys.exit(0)
else:
    sys.exit(1)
EOF 

So if the python version is greater than (3,0) viz the python version is a pyhthon3 variant. the test function exits with 0 to return true/success.

on return to the calling function

    is_python3                 && python=python2

because is_python3 returns 0 ie is successful/true, the statement then sets python to python2 because of the ""&&"" operator.

The operator ""&&"" should in fact be the OR operator, two vertical pipes, ""\|\|"" (without the backslashes) meaning if not true/not success, ie only set python to python2 if the python version is not 3.

I think somebody forgot that in Bourne shell scripts, functions which return 0 are successful, other values are failure, as opposed to other scripting languages (eg PERL) where 0 is false.
"	Bug Report - General	closed	major	30.1	MythTV - configure script	v30-fixes	medium	Won't Fix	python version logic		0
