Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/repo-add.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/repo-add.sh.in')
-rw-r--r--scripts/repo-add.sh.in10
1 files changed, 2 insertions, 8 deletions
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 1e77015f..e7a4be40 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -595,15 +595,9 @@ if (( success )); then
filename=${REPO_DB_FILE##*/}
pushd "$tmpdir" >/dev/null
- if [[ -n $(ls) ]]; then
- bsdtar -c${TAR_OPT}f "$filename" *
- else
- # we have no packages remaining? zip up some emptyness
- warning "$(gettext "No packages remain, creating empty database.")"
- bsdtar -c${TAR_OPT}f "$filename" -T /dev/null
- fi
+ # strip the './' off filenames; this also allows us to tar an empty dir
+ bsdtar -s %^./%% -c${TAR_OPT}f "$REPO_DB_FILE" ./
create_signature "$filename"
-
popd >/dev/null
[[ -f $REPO_DB_FILE ]] && mv -f "$REPO_DB_FILE" "${REPO_DB_FILE}.old"