diff options
author | 2015-06-25 02:05:58 -0400 | |
---|---|---|
committer | 2015-08-12 18:30:41 +0200 | |
commit | 5b38bf6e178a00620e2371210589ed9029b33aaf (patch) | |
tree | 9795157c57c3bba4fafba49e273c365fb3343c5e | |
parent | da6f52c936eac749727e09f6dd0db0c2fade58d5 (diff) | |
download | paludis-5b38bf6e178a00620e2371210589ed9029b33aaf.tar.gz paludis-5b38bf6e178a00620e2371210589ed9029b33aaf.tar.xz |
utils/unpack: Don't quote UNPACKONLY, it can be interpreted falsely
If $UNPACKONLY is quoted, but is not set, bash sets it to an empty string,
and the tar program will recieve it as an empty argument. On some tar
implementations (bsdtar from libarchive is my test case), this can cause
issues because it'll interpret it as an empty inclusion pattern.
Change-Id: I080db02e983d0ed15a52c9a1152b29a6656cae61
Reviewed-on: https://galileo.mailstation.de/gerrit/2671
Reviewed-by: Bo Ørsted Andresen <zlin@exherbo.org>
-rwxr-xr-x | paludis/repositories/e/ebuild/utils/unpack | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/paludis/repositories/e/ebuild/utils/unpack b/paludis/repositories/e/ebuild/utils/unpack index aebe57cee..9f01d6ee5 100755 --- a/paludis/repositories/e/ebuild/utils/unpack +++ b/paludis/repositories/e/ebuild/utils/unpack @@ -48,8 +48,8 @@ unpack_tar.gz() { } unpack_tar.bz2() { - echo tar jxf "${1}" --no-same-owner "${TAR_OPTIONS[@]}" "${UNPACKONLY}" 1>&2 - tar jxf "${1}" --no-same-owner "${TAR_OPTIONS[@]}" "${UNPACKONLY}" + echo tar jxf "${1}" --no-same-owner "${TAR_OPTIONS[@]}" ${UNPACKONLY:+"${UNPACKONLY}"} 1>&2 + tar jxf "${1}" --no-same-owner "${TAR_OPTIONS[@]}" ${UNPACKONLY:+"${UNPACKONLY}"} } unpack_zip() { |