Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2019-10-22 17:27:15 +1000
committerAllan McRae <allan@archlinux.org>2019-10-22 17:27:15 +1000
commit7df70e7fff7ded37b0d1fe1be814f4b70aa754ad (patch)
treed5d3eea0a5ec109ae7e72d40779c7e9a76e7b4d0
parent942b909829d529409216939b36af11e8480726f5 (diff)
Fix compression of package databases with zstd
Commit 7afe51171 attempted to add zstd compression support to repo-add, but failed... FS#64213 Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--scripts/repo-add.sh.in12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 6a889803..079249e6 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -193,11 +193,11 @@ verify_repo_extension() {
local repofile=$1
case $repofile in
- *.db.tar.gz) TAR_OPT="z" ;;
- *.db.tar.bz2) TAR_OPT="j" ;;
- *.db.tar.xz) TAR_OPT="J" ;;
+ *.db.tar.gz) TAR_OPT="-z" ;;
+ *.db.tar.bz2) TAR_OPT="-j" ;;
+ *.db.tar.xz) TAR_OPT="-J" ;;
*.db.tar.zst) TAR_OPT="--zstd" ;;
- *.db.tar.Z) TAR_OPT="Z" ;;
+ *.db.tar.Z) TAR_OPT="-Z" ;;
*.db.tar) TAR_OPT="" ;;
*) error "$(gettext "'%s' does not have a valid database archive extension.")" \
"$repofile"
@@ -534,11 +534,11 @@ create_db() {
pushd "$tmpdir/$repo" >/dev/null
if ( shopt -s nullglob; files=(*); (( ${#files[*]} )) ); then
- bsdtar -c${TAR_OPT}f "$tempname" *
+ bsdtar -c ${TAR_OPT} -f "$tempname" *
else
# we have no packages remaining? zip up some emptyness
warning "$(gettext "No packages remain, creating empty database.")"
- bsdtar -c${TAR_OPT}f "$tempname" -T /dev/null
+ bsdtar -c ${TAR_OPT} -f "$tempname" -T /dev/null
fi
popd >/dev/null