#5776 cleaned up the way the the current working directory is managed (less magic state). bcl2fastq is packaged like a russian doll, rather than an archive file that contains the source, there's a zip file that contains a tar.gz file that contains the source. The package definition has a bit of extra code that unpacks the inner tarball. That extra bit of code now needs to explicitly arrange to be in the correct directory before it does its work.
This commit is contained in:
parent
4774c9887e
commit
b46f1e3605
@ -85,16 +85,20 @@ def do_stage(self, mirror_only=False):
|
|||||||
def unpack_it(self, f):
|
def unpack_it(self, f):
|
||||||
def wrap():
|
def wrap():
|
||||||
f() # call the original expand_archive()
|
f() # call the original expand_archive()
|
||||||
if os.path.isdir('bcl2fastq'):
|
with working_dir(self.stage.path):
|
||||||
tty.msg("The tarball has already been unpacked")
|
if os.path.isdir('bcl2fastq'):
|
||||||
else:
|
tty.msg("The tarball has already been unpacked")
|
||||||
tty.msg("Unpacking bcl2fastq2 tarball")
|
else:
|
||||||
tarball = 'bcl2fastq2-v{0}.tar.gz'.format(self.version.dotted)
|
tty.msg("Unpacking bcl2fastq2 tarball")
|
||||||
shutil.move(join_path('spack-expanded-archive', tarball), '.')
|
tty.msg("cwd sez: {0}".format(os.getcwd()))
|
||||||
os.rmdir('spack-expanded-archive')
|
tarball = 'bcl2fastq2-v{0}.tar.gz'.format(
|
||||||
tar = which('tar')
|
self.version.dotted)
|
||||||
tar('-xf', tarball)
|
shutil.move(join_path('spack-expanded-archive', tarball),
|
||||||
tty.msg("Finished unpacking bcl2fastq2 tarball")
|
'.')
|
||||||
|
os.rmdir('spack-expanded-archive')
|
||||||
|
tar = which('tar')
|
||||||
|
tar('-xf', tarball)
|
||||||
|
tty.msg("Finished unpacking bcl2fastq2 tarball")
|
||||||
return wrap
|
return wrap
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
|
Loading…
Reference in New Issue
Block a user