summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/ack/package.py
diff options
context:
space:
mode:
authorOliver Breitwieser <oliver.breitwieser@kip.uni-heidelberg.de>2019-11-25 00:33:49 +0100
committerAdam J. Stewart <ajstewart426@gmail.com>2019-11-24 17:33:49 -0600
commit4c4aba5f9e1a878ca3622ca8c197ae09314bebcf (patch)
tree20041506f8c39351389a9557d962c6c95d472883 /var/spack/repos/builtin/packages/ack/package.py
parent959f52dbf562ceeb1053fc22be986fdc5112a6ce (diff)
downloadspack-4c4aba5f9e1a878ca3622ca8c197ae09314bebcf.tar.gz
spack-4c4aba5f9e1a878ca3622ca8c197ae09314bebcf.tar.bz2
spack-4c4aba5f9e1a878ca3622ca8c197ae09314bebcf.tar.xz
spack-4c4aba5f9e1a878ca3622ca8c197ae09314bebcf.zip
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
Diffstat (limited to 'var/spack/repos/builtin/packages/ack/package.py')
-rw-r--r--var/spack/repos/builtin/packages/ack/package.py12
1 files changed, 7 insertions, 5 deletions
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)