summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hartzell <hartzell@alerce.com>2018-11-27 17:22:14 -0800
committerPeter Scheibel <scheibel1@llnl.gov>2018-11-27 17:22:14 -0800
commite4e980ee979b386cdd7fba835a34d0d964f73fe8 (patch)
treea2f138b3855a56a78c8331ec575b79a85afa3eb0
parent33b112a60d88df0c53c125ae4de8202c72e298c6 (diff)
downloadspack-e4e980ee979b386cdd7fba835a34d0d964f73fe8.tar.gz
spack-e4e980ee979b386cdd7fba835a34d0d964f73fe8.tar.bz2
spack-e4e980ee979b386cdd7fba835a34d0d964f73fe8.tar.xz
spack-e4e980ee979b386cdd7fba835a34d0d964f73fe8.zip
bcl2fastq2 package: recursively delete after copy (#9959)
Fixes #9944 73c978d replaced a move with a copy, which cased rmdir to fail (as it expects an empty directory). This switches to use `shutil.rmtree` instead.
-rw-r--r--var/spack/repos/builtin/packages/bcl2fastq2/package.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/bcl2fastq2/package.py b/var/spack/repos/builtin/packages/bcl2fastq2/package.py
index f3eb3175ac..1b07e50d54 100644
--- a/var/spack/repos/builtin/packages/bcl2fastq2/package.py
+++ b/var/spack/repos/builtin/packages/bcl2fastq2/package.py
@@ -5,6 +5,7 @@
from spack import *
import os
+import shutil
import glob
import llnl.util.tty as tty
@@ -71,11 +72,10 @@ class Bcl2fastq2(Package):
tty.msg("The tarball has already been unpacked")
else:
tty.msg("Unpacking bcl2fastq2 tarball")
- tty.msg("cwd sez: {0}".format(os.getcwd()))
tarball = glob.glob(join_path('spack-expanded-archive',
'bcl2fastq2*.tar.gz'))[0]
copy(tarball, '.')
- os.rmdir('spack-expanded-archive')
+ shutil.rmtree('spack-expanded-archive')
tar = which('tar')
tarball = os.path.basename(tarball)
tar('-xf', tarball)