From 66958b323212511abef980e5f9d455409d04d3b4 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 2 Aug 2021 17:29:08 +0300 Subject: [PATCH] kiss-export: Remove utility This utility must be rewritten (with added complexity). There is no portable way to tell tar to add a directory but not include its contents (unless it is empty). The simple approach of giving tar the package's manifest is not workable without omitting directories. This causes issues when installing an exported tarball and target directories do not exist. The most obvious solution is to copy all of the package's files to a temporary directory and then pass that to tar. This would work fine but slow the process down substantially. Another solution will be sought and if not possible the above will be implemented instead. Closes #254 --- contrib/kiss-export | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100755 contrib/kiss-export diff --git a/contrib/kiss-export b/contrib/kiss-export deleted file mode 100755 index f36fd29..0000000 --- a/contrib/kiss-export +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -ef -# Turn an installed package into a KISS tarball - -db=$KISS_ROOT/var/db/kiss/installed -pkg=${1:-"${PWD##*/}"} - -kiss list "$pkg" >/dev/null || { - printf 'usage: kiss-export [pkg]\n' - exit 1 -} - -read -r ver rel 2>/dev/null < "$db/$1/version" - -set -- - -while read -r file; do - [ -d "$KISS_ROOT/$file" ] || set -- "$@" ".$file" -done < "$db/$pkg/manifest" - -cd "$KISS_ROOT/" - -dest="$OLDPWD/$pkg@$ver-$rel.tar.${KISS_COMPRESS:-gz}" - -tar cf - "$@" | case ${KISS_COMPRESS:-gz} in - bz2) bzip2 -z ;; - gz) gzip -6 ;; - lzma) lzma -z ;; - lz) lzip -z ;; - xz) xz -zT 0 ;; - zst) zstd -z ;; -esac > "$dest" - -printf 'created %s\n' "$dest"