Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/bockbuild.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Christoforides <alexis@thenull.net>2017-08-14 23:06:54 +0300
committerAlexis Christoforides <alexis@thenull.net>2017-08-14 23:07:00 +0300
commit141e6a55feee9052e347c424aff09b156e0d5497 (patch)
treef8e689ace15a9b735ddef400011f8e1e3b4b0fa0 /bockbuild
parent3daa3571b6e22d87b5eab5251dda7fadf9e93018 (diff)
Allow for non-fatal shell execution, and turn “install_name_tool” staging failures to warnings as we find a more permanent solution to AOT dylibs not always having enough field space for the new path (all other dylibs made in the build with the XCode toolchain typically do, as they are built with the “-headerpad_max_install_names” flag.
Diffstat (limited to 'bockbuild')
-rw-r--r--bockbuild/darwinprofile.py6
-rw-r--r--bockbuild/util/util.py9
2 files changed, 9 insertions, 6 deletions
diff --git a/bockbuild/darwinprofile.py b/bockbuild/darwinprofile.py
index 7359af1..42cc681 100644
--- a/bockbuild/darwinprofile.py
+++ b/bockbuild/darwinprofile.py
@@ -330,9 +330,9 @@ class DarwinProfile (UnixProfile):
def process(self, path, fixup_func):
staged_path = fixup_func(path)
- run_shell('install_name_tool -id %s %s' %
- (staged_path, path), False)
+ run_shell('install_name_tool -id %s %s' %
+ (staged_path, path), fatal=False)
libs = backtick('otool -L %s' % path)
for line in libs:
# parse 'otool -L'
@@ -343,4 +343,4 @@ class DarwinProfile (UnixProfile):
remap = fixup_func(rpath)
if remap != rpath:
run_shell('install_name_tool -change %s %s %s' %
- (rpath, remap, path), False)
+ (rpath, remap, path), fatal=False)
diff --git a/bockbuild/util/util.py b/bockbuild/util/util.py
index 5d6d3fd..9fe76b8 100644
--- a/bockbuild/util/util.py
+++ b/bockbuild/util/util.py
@@ -686,7 +686,7 @@ def run(cmd, args, cwd, env=None):
return (exit_code, stdout[:-1], stderr)
-def run_shell(cmd, print_cmd=False, cwd=None):
+def run_shell(cmd, print_cmd=False, cwd=None, fatal=True):
if print_cmd:
print '++', cmd
if not print_cmd:
@@ -694,8 +694,11 @@ def run_shell(cmd, print_cmd=False, cwd=None):
proc = subprocess.Popen(cmd, shell=True, bufsize=-1, cwd=cwd)
exit_code = proc.wait()
if not exit_code == 0:
- raise CommandException('"%s" failed, error code %s' %
- (cmd, exit_code), cwd)
+ msg = '"%s" failed, error code %s' % (cmd, exit_code)
+ if fatal:
+ raise CommandException(msg, cwd)
+ else:
+ warn (msg)
def backtick(cmd, print_cmd=False, echo=False):