From d071a9e395b639bb8d7dfa37e6d6c1612162c780 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 8 Sep 2015 16:41:26 +0200 Subject: [PATCH] Fixed ninja bug --- configure | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 12d2edef..fa207f6e 100755 --- a/configure +++ b/configure @@ -71,7 +71,7 @@ from collections import namedtuple Info = namedtuple("Info", ["url", "description", "default_path"]) -path_github = {"head": "http://github.com/", "tail": "archive/master.tar.gz"} +path_github = {"head": "http://github.com", "tail": "archive/master.tar.gz"} ocaml = Info( url='http://raw.github.com/ocaml/opam/master/shell/opam_installer.sh', @@ -180,6 +180,8 @@ def check_output(*popenargs, **kwargs): cmd = popenargs[0] error = subprocess.CalledProcessError(retcode, cmd) error.output = output +# print output +# print unused_err raise error return output @@ -224,7 +226,7 @@ def checking(d_dependency): return a - except subprocess.CalledProcessError: + except (OSError,subprocess.CalledProcessError): default_path = d_info[binary].default_path if os.path.exists(default_path): return default_path @@ -341,9 +343,9 @@ _|_ | | _> |_ (_| | | (_| |_ | (_) | | extension = splitext(url)[1] path_archive = "Downloads/{0}{1}".format("ninja", extension) - l_cmd = ["cd install &&", - "wget {0} -O {1} -o /dev/null &&".format(url, path_archive), - "./scripts/install_ninja.sh 2> /dev/null &&", "cd -"] + l_cmd = ["set -x ;", "cd install &&", + "wget {0} -O {1} &&".format(url, path_archive), + "./scripts/install_ninja.sh &&", "cd -"] try: check_output(" ".join(l_cmd), shell=True)