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 <ataraxia937@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
43dacceb6b
commit
630b7b94c3
1 changed files with 2 additions and 1 deletions
|
@ -574,12 +574,13 @@ if (( success )); then
|
||||||
pushd "$tmpdir" >/dev/null
|
pushd "$tmpdir" >/dev/null
|
||||||
if [[ -n $(ls) ]]; then
|
if [[ -n $(ls) ]]; then
|
||||||
bsdtar -c${TAR_OPT}f "$filename" *
|
bsdtar -c${TAR_OPT}f "$filename" *
|
||||||
create_signature "$filename"
|
|
||||||
else
|
else
|
||||||
# we have no packages remaining? zip up some emptyness
|
# we have no packages remaining? zip up some emptyness
|
||||||
warning "$(gettext "No packages remain, creating empty database.")"
|
warning "$(gettext "No packages remain, creating empty database.")"
|
||||||
bsdtar -c${TAR_OPT}f "$filename" -T /dev/null
|
bsdtar -c${TAR_OPT}f "$filename" -T /dev/null
|
||||||
fi
|
fi
|
||||||
|
create_signature "$filename"
|
||||||
|
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
[[ -f $REPO_DB_FILE ]] && mv -f "$REPO_DB_FILE" "${REPO_DB_FILE}.old"
|
[[ -f $REPO_DB_FILE ]] && mv -f "$REPO_DB_FILE" "${REPO_DB_FILE}.old"
|
||||||
|
|
Loading…
Add table
Reference in a new issue