Skip to content

Commit 1961e68

Browse files
committed
Extract the signature files and the tarball in stage directory.
1 parent 7d64020 commit 1961e68

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

lib/spack/spack/binary_distribution.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,24 +205,24 @@ def extract_tarball(package):
205205
"""
206206
extract binary tarball for given package into install area
207207
"""
208-
tarball = tarball_name(package.spec)
208+
tarball = tarball_name(package.spec,'.spack')
209209
local_tarball = package.stage.path + "/" + tarball
210210
mkdirp(package.prefix)
211-
tarfile_name = tarball_path_name(spec, '.tar.gz')
212-
tarfile_path = os.path.join(package.prefix, tarfile_name)
211+
tarfile_name = tarball_name(package.spec, '.tar.gz')
212+
tarfile_path = os.path.join(package.stage.path, tarfile_name)
213213
with tarfile.open(local_tarball, 'r') as tar:
214-
tar.extract('spec.yaml', package.prefix)
215-
tar.extract('spec.yaml.asc', package.prefix)
214+
tar.extract('spec.yaml', package.stage.path)
215+
tar.extract('spec.yaml.asc', package.stage.path)
216216

217217
# spack gpg verify os.path.join(package.prefix, 'spec.yaml')
218218

219-
tar.extract(tarfile_name, package.prefix)
220-
tar.extract(tarfile_name + '.asc', package.prefix)
219+
tar.extract(tarfile_name, package.stage.path)
220+
tar.extract(tarfile_name + '.asc', package.stage.path)
221221

222222
# spack gpg verify tarfile_path
223223

224224
with tarfile.open(tarfile_path, 'r') as tar:
225-
tar.extractall(path=package.prefix)
225+
tar.extractall(path = os.path.dirname(package.prefix))
226226

227227
#os.remove(tarfile_path)
228228
#os.remove(tarfile_path + '.asc')

0 commit comments

Comments
 (0)