arvados-cli 0.1.20150415200702 → 0.1.20150522214217

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/crunch-job +16 -8
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c5a29066057cf677fedb4ac70ed67cc35d6a556c
4
- data.tar.gz: 90a07dc724dbdfd869e9ce1ba621845f5b2a90f8
3
+ metadata.gz: 99b8c07b3475f9b14be3792ee0563dbd9cbd861b
4
+ data.tar.gz: 1a9c6e8c69eba7197c7f05318c66202f4fd532c1
5
5
  SHA512:
6
- metadata.gz: 66e9d5b6de7e26a854741e6c3d1303237420de566ab3b22ebc10c42cf1321be030dcbaf653e5c306c49ff98c9ab536ccb25a6b9ea1e2b0317ea35a75e0cb4ccd
7
- data.tar.gz: a95c578369dcfb2176cdf24e382e8131979a52cf9b6eddfeb856294f9b16bc95fccafafed3ead0f2a22b55b91607d7bd0c8f06510338d5320b30062a42980f22
6
+ metadata.gz: 189053906f0dd364c0423fa8125272c1d769b6bda484686dc75cb0fe0726e11065b34faa1c8d2dff293260b9c346089b37082b99795f1e77c54c80eb79371510
7
+ data.tar.gz: db61854c2308ac39798ed2a68bc3178b3b9b9ad3080a9f664e28de68a2699b983c1857802a14f60dffe3a21de1ffa4ca07f4fbade7b2e5522c62e5c183d1a5d8
data/bin/crunch-job CHANGED
@@ -597,6 +597,7 @@ else {
597
597
  my @execargs = ("sh", "-c",
598
598
  "mkdir -p $ENV{CRUNCH_INSTALL} && cd $ENV{CRUNCH_TMP} && perl -");
599
599
 
600
+ $ENV{"CRUNCH_GIT_ARCHIVE_HASH"} = md5_hex($git_archive);
600
601
  my $installpid = fork();
601
602
  if ($installpid == 0)
602
603
  {
@@ -1888,7 +1889,7 @@ use constant TASK_TEMPFAIL => 111;
1888
1889
  my %SDK_ENVVARS = ("perl/lib" => "PERLLIB", "ruby/lib" => "RUBYLIB");
1889
1890
 
1890
1891
  my $destdir = $ENV{"CRUNCH_SRC"};
1891
- my $commit = $ENV{"CRUNCH_SRC_COMMIT"};
1892
+ my $archive_hash = $ENV{"CRUNCH_GIT_ARCHIVE_HASH"};
1892
1893
  my $repo = $ENV{"CRUNCH_SRC_URL"};
1893
1894
  my $install_dir = $ENV{"CRUNCH_INSTALL"} || (getcwd() . "/opt");
1894
1895
  my $job_work = $ENV{"JOB_WORK"};
@@ -1981,12 +1982,19 @@ if (@ARGV) {
1981
1982
  ### Installation mode
1982
1983
  open L, ">", "$destdir.lock" or die "$destdir.lock: $!";
1983
1984
  flock L, LOCK_EX;
1984
- if (readlink ("$destdir.commit") eq $commit && -d $destdir) {
1985
- # This version already installed -> nothing to do.
1985
+ if (readlink ("$destdir.archive_hash") eq $archive_hash && -d $destdir) {
1986
+ # This exact git archive (source + arvados sdk) is already installed
1987
+ # here, so there's no need to reinstall it.
1988
+
1989
+ # We must consume our DATA section, though: otherwise the process
1990
+ # feeding it to us will get SIGPIPE.
1991
+ my $buf;
1992
+ while (read(DATA, $buf, 65536)) { }
1993
+
1986
1994
  exit(0);
1987
1995
  }
1988
1996
 
1989
- unlink "$destdir.commit";
1997
+ unlink "$destdir.archive_hash";
1990
1998
  mkdir $destdir;
1991
1999
 
1992
2000
  if (!open(TARX, "|-", "tar", "-xC", $destdir)) {
@@ -2035,10 +2043,10 @@ if (-e "$destdir/crunch_scripts/install") {
2035
2043
  shell_or_die (undef, "./install.sh", $install_dir);
2036
2044
  }
2037
2045
 
2038
- if ($commit) {
2039
- unlink "$destdir.commit.new";
2040
- symlink ($commit, "$destdir.commit.new") or die "$destdir.commit.new: $!";
2041
- rename ("$destdir.commit.new", "$destdir.commit") or die "$destdir.commit: $!";
2046
+ if ($archive_hash) {
2047
+ unlink "$destdir.archive_hash.new";
2048
+ symlink ($archive_hash, "$destdir.archive_hash.new") or die "$destdir.archive_hash.new: $!";
2049
+ rename ("$destdir.archive_hash.new", "$destdir.archive_hash") or die "$destdir.archive_hash: $!";
2042
2050
  }
2043
2051
 
2044
2052
  close L;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arvados-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20150415200702
4
+ version: 0.1.20150522214217
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arvados Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-15 00:00:00.000000000 Z
11
+ date: 2015-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: arvados
@@ -178,7 +178,7 @@ dependencies:
178
178
  - - "<"
179
179
  - !ruby/object:Gem::Version
180
180
  version: 1.0.0
181
- description: Arvados command line tools, git commit d2e7a97c8d24ef8ae61d860e9c972626f80cf2b4
181
+ description: Arvados command line tools, git commit 0f125dd51c7dc13047672dee5362866f31885e0a
182
182
  email: gem-dev@curoverse.com
183
183
  executables:
184
184
  - arv