Skip to content

Commit caef231

Browse files
authored
Merge pull request #3698 from boegel/unset_TAPE
make sure that $TAPE is unset when using piped tar
2 parents 44470b6 + bbcd8ae commit caef231

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

easybuild/tools/filetools.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,11 @@
141141
'.tb2': "tar xjf %(filepath)s",
142142
'.tbz': "tar xjf %(filepath)s",
143143
'.tbz2': "tar xjf %(filepath)s",
144-
# xzipped or xzipped tarball
145-
'.tar.xz': "unxz %(filepath)s --stdout | tar x",
146-
'.txz': "unxz %(filepath)s --stdout | tar x",
144+
# xzipped or xzipped tarball;
145+
# need to make sure that $TAPE is not set to avoid 'tar x' command failing,
146+
# see https://github.com/easybuilders/easybuild-framework/issues/3652
147+
'.tar.xz': "unset TAPE; unxz %(filepath)s --stdout | tar x",
148+
'.txz': "unset TAPE; unxz %(filepath)s --stdout | tar x",
147149
'.xz': "unxz %(filepath)s",
148150
# tarball
149151
'.tar': "tar xf %(filepath)s",

test/framework/filetools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ def test_extract_cmd(self):
9292
('untar.gz', "gunzip -c untar.gz > untar"),
9393
("/some/path/test.gz", "gunzip -c /some/path/test.gz > test"),
9494
('test.xz', "unxz test.xz"),
95-
('test.tar.xz', "unxz test.tar.xz --stdout | tar x"),
96-
('test.txz', "unxz test.txz --stdout | tar x"),
95+
('test.tar.xz', "unset TAPE; unxz test.tar.xz --stdout | tar x"),
96+
('test.txz', "unset TAPE; unxz test.txz --stdout | tar x"),
9797
('test.iso', "7z x test.iso"),
9898
('test.tar.Z', "tar xzf test.tar.Z"),
9999
('test.foo.bar.sh', "cp -a test.foo.bar.sh ."),

0 commit comments

Comments
 (0)