X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/557b0b0e61a16c098785f66e5f10b0b72973d822..4d84c7d2c66ea255db24e2b4159bcafed29ef00d:/sdk/cli/bin/crunch-job diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job index 5da8c78dda..8b4717734a 100755 --- a/sdk/cli/bin/crunch-job +++ b/sdk/cli/bin/crunch-job @@ -821,20 +821,22 @@ if ($collated_output) or die "failed to get collated manifest: $!"; # Read the original manifest, and strip permission hints from it, # so we can put the result in a Collection. - my @manifest_lines = (); + my @stripped_manifest_lines = (); + my $orig_manifest_text = ''; while (my $manifest_line = <$orig_manifest>) { + $orig_manifest_text .= $manifest_line; my @words = split(/ /, $manifest_line, -1); foreach my $ii (0..$#words) { if ($words[$ii] =~ /^[0-9a-f]{32}\+/) { $words[$ii] =~ s/\+A[0-9a-f]{40}@[0-9a-f]{8}\b//; } } - push(@manifest_lines, join(" ", @words)); + push(@stripped_manifest_lines, join(" ", @words)); } - my $manifest_text = join("", @manifest_lines); + my $stripped_manifest_text = join("", @stripped_manifest_lines); my $output = $arv->{'collections'}->{'create'}->execute('collection' => { - 'uuid' => md5_hex($manifest_text), - 'manifest_text' => $manifest_text, + 'uuid' => md5_hex($stripped_manifest_text), + 'manifest_text' => $orig_manifest_text, }); $Job->update_attributes('output' => $output->{uuid}); if ($Job->{'output_is_persistent'}) {