[pacman-dev] [PATCH] libmakepkg: compress: fix tar extension

Michael Straube michael.straubej at gmail.com
Tue Oct 20 15:31:19 UTC 2020


With commit 74aacf44958e1343b910b3fbdcf753393857f070 creating uncompressed .tar
packages fails.

  -> Compressing package...
/usr/share/makepkg/util/compress.sh: line 70: COMPRESS.TAR[@]: invalid variable name
bsdtar: Write error

Empty the '$ext' variable for the '.tar' extension in get_compress_command() to
fix this. We would fallback to cat for 'tar' anyways.

Signed-off-by: Michael Straube <michael.straubej at gmail.com>
---
 scripts/libmakepkg/util/compress.sh.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/libmakepkg/util/compress.sh.in b/scripts/libmakepkg/util/compress.sh.in
index d35a01fa..6595e0d6 100644
--- a/scripts/libmakepkg/util/compress.sh.in
+++ b/scripts/libmakepkg/util/compress.sh.in
@@ -65,6 +65,8 @@ get_compression_command() {
 	esac
 
 	ext=${ext#*.tar.}
+	ext=${ext#*.tar}
+
 	if [[ -n $ext ]]; then
 		extarray="COMPRESS${ext^^}[@]"
 		resolvecmd=("${!extarray}")
-- 
2.28.0


More information about the pacman-dev mailing list