[ARVADOS] updated: f0a92e384da79e0a17efb42de17031f45f006e44
git at public.curoverse.com
git at public.curoverse.com
Fri Jun 12 14:05:35 EDT 2015
Summary of changes:
sdk/cli/bin/crunch-job | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
via f0a92e384da79e0a17efb42de17031f45f006e44 (commit)
via 1658729c6bb2aace68860437413b8553b1ce563f (commit)
from 361e83e8ca5b3c55c4852f502a8fb7c82ff7bff5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit f0a92e384da79e0a17efb42de17031f45f006e44
Merge: 361e83e 1658729
Author: Brett Smith <brett at curoverse.com>
Date: Fri Jun 12 14:05:19 2015 -0400
Merge branch '6149-quiet-egg-info-stderr-wip'
Closes #6149, #6284.
commit 1658729c6bb2aace68860437413b8553b1ce563f
Author: Brett Smith <brett at curoverse.com>
Date: Thu Jun 11 17:16:03 2015 -0400
6149: crunch-job installer handles egg_info errors better.
Capture the command's stderr and confirm that the error refers to
git. If it does, ignore the stderr and set a build tag. Otherwise,
propagate stderr and abort.
diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index 090cadf..d8ae6e6 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -2146,13 +2146,27 @@ if (-d $sdk_root) {
}
my $python_dir = "$install_dir/python";
-if ((-d $python_dir) and can_run("python2.7") and
- (system("python2.7", "$python_dir/setup.py", "--quiet", "egg_info") != 0)) {
- # egg_info failed, probably when it asked git for a build tag.
- # Specify no build tag.
- open(my $pysdk_cfg, ">>", "$python_dir/setup.cfg");
- print $pysdk_cfg "\n[egg_info]\ntag_build =\n";
- close($pysdk_cfg);
+if ((-d $python_dir) and can_run("python2.7")) {
+ open(my $egg_info_pipe, "-|",
+ "python2.7 \Q$python_dir/setup.py\E --quiet egg_info 2>&1 >/dev/null");
+ my @egg_info_errors = <$egg_info_pipe>;
+ close($egg_info_pipe);
+ if ($?) {
+ if (@egg_info_errors and ($egg_info_errors[-1] =~ /\bgit\b/)) {
+ # egg_info apparently failed because it couldn't ask git for a build tag.
+ # Specify no build tag.
+ open(my $pysdk_cfg, ">>", "$python_dir/setup.cfg");
+ print $pysdk_cfg "\n[egg_info]\ntag_build =\n";
+ close($pysdk_cfg);
+ } else {
+ my $egg_info_exit = $? >> 8;
+ foreach my $errline (@egg_info_errors) {
+ print STDERR_ORIG $errline;
+ }
+ warn "python setup.py egg_info failed: exit $egg_info_exit";
+ exit ($egg_info_exit || 1);
+ }
+ }
}
# Hide messages from the install script (unless it fails: shell_or_die
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list