From 4c4aba5f9e1a878ca3622ca8c197ae09314bebcf Mon Sep 17 00:00:00 2001 From: Oliver Breitwieser Date: Mon, 25 Nov 2019 00:33:49 +0100 Subject: ack: Fix install modifying download cache (#13836) This makes several installs from the same download cache impossible once the hash of the used perl-install changes. Fixes: #13824 Change-Id: I5f10d9d54ae999d0ca7e4171f989dfca2e6a7169 --- var/spack/repos/builtin/packages/ack/package.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/ack/package.py b/var/spack/repos/builtin/packages/ack/package.py index efbe029b32..c974e26702 100644 --- a/var/spack/repos/builtin/packages/ack/package.py +++ b/var/spack/repos/builtin/packages/ack/package.py @@ -25,11 +25,13 @@ class Ack(Package): def install(self, spec, prefix): mkdirp(prefix.bin) - ack = 'ack-{0}-single-file'.format(self.version) + ack_source = 'ack-{0}-single-file'.format(self.version) + ack_installed = join_path(prefix.bin, "ack") + + # install source + install(ack_source, ack_installed) + set_executable(ack_installed) # rewrite the script's #! line to call the perl dependency shbang = '#!' + spec['perl'].command.path - filter_file(r'^#!/usr/bin/env perl', shbang, ack) - - install(ack, join_path(prefix.bin, "ack")) - set_executable(join_path(prefix.bin, "ack")) + filter_file(r'^#!/usr/bin/env perl', shbang, ack_installed) -- cgit v1.2.3-70-g09d2