RFR: JDK-8011178 : improve common/bin/hgforest.sh python detection (MacOS)
Mike Duigou
mike.duigou at oracle.com
Mon Apr 1 18:39:03 UTC 2013
I've created a bug for this improvement, JDK-8011178, and would like a reviewer for the proposed patch below.
I will push it through TL if approved as I am not a jdk8/build repo committer.
Mike
On Jan 16 2013, at 16:53 , Mike Duigou wrote:
> With the mac ports version of mercurial (wasn't I just complaining about another mac ports problems yesterday? ;-) ) the path to python in the mercurial launcher has is
>
> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
>
> Note the capital "P" which is what was running afoul of the hgforest.sh detection. The following patch uses a different technique for checking the python executable.
>
> Mike
>
> PS:- I assume that the make/scripts/hgforest.sh is going away at some point?
>
> diff --git a/common/bin/hgforest.sh b/common/bin/hgforest.sh
> --- a/common/bin/hgforest.sh
> +++ b/common/bin/hgforest.sh
> @@ -51,7 +51,7 @@
> bpython="`basename "$python"`"
> fi
>
> -if [ "python" = "$bpython" -a -x "$python" ] ; then
> +if [ -x "$python" -a ! -d "$python" -a "`${python} --version 2>&1 | cut -f 1 -d " "`" == "Python" ] ; then
> hg="${python} -u ${whichhg}"
> else
> echo Cannot find python from hg launcher. Running plain hg, which probably has buffered stdout.
>
More information about the build-dev
mailing list