[ARVADOS] created: f15b218327029a379264db6997a85b2d2835088a

git at public.curoverse.com git at public.curoverse.com
Wed Jan 7 14:37:14 EST 2015


        at  f15b218327029a379264db6997a85b2d2835088a (commit)


commit f15b218327029a379264db6997a85b2d2835088a
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Jan 7 14:38:41 2015 -0500

    4312: Use "install" phase of bootstrap script to report the installed versions
    of any arvados pip or debian packages.  Like virtualenv logic, only reports for
    task 0 (since every task starts the same image).

diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index 820d142..21ee2d7 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -1851,14 +1851,27 @@ if (@ARGV) {
     $Log->("Built Python SDK virtualenv");
   }
 
+  my $pkgs;
   if ($venv_built) {
     $Log->("Running in Python SDK virtualenv");
+    $pkgs = `. \Q$venv_dir/bin/activate\E && ((pip freeze 2>/dev/null | grep arvados) || dpkg --show '*arvados*')`;
     my $orig_argv = join(" ", map { quotemeta($_); } @ARGV);
     @ARGV = ("/bin/sh", "-ec",
              ". \Q$venv_dir/bin/activate\E; exec $orig_argv");
   } elsif (-d $python_src) {
     $Log->("Warning: virtualenv not found inside Docker container default " +
            "\$PATH. Can't install Python SDK.");
+  } else {
+    $pkgs = `((pip freeze 2>/dev/null | grep arvados) || dpkg --show '*arvados*')`;
+  }
+
+  if ($pkgs) {
+    $Log->("Using Arvados SDK:");
+    foreach my $line (split /\n/, $pkgs) {
+      $Log->($line);
+    }
+  } else {
+    $Log->("Arvados SDK packages not found");
   }
 
   while (my ($sdk_dir, $sdk_envkey) = each(%SDK_ENVVARS)) {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list