From 630b7b94c39ddc60d4e2b3c80d5d9f3101049b93 Mon Sep 17 00:00:00 2001 From: Ray Kohler Date: Fri, 25 Mar 2011 19:25:38 -0400 Subject: Sign database even if empty Move the create_signature() call outside the case of non-empty databases, so it will be called regardless. Signed-off-by: Ray Kohler Signed-off-by: Dan McGee --- scripts/repo-add.sh.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 4447732d..1c0347cc 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -574,12 +574,13 @@ if (( success )); then pushd "$tmpdir" >/dev/null if [[ -n $(ls) ]]; then bsdtar -c${TAR_OPT}f "$filename" * - create_signature "$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 + create_signature "$filename" + popd >/dev/null [[ -f $REPO_DB_FILE ]] && mv -f "$REPO_DB_FILE" "${REPO_DB_FILE}.old" -- cgit v1.2.3-70-g09d2