makepkg: Move check for signature metadata to central location
Move the check for the `NEWSIG` metadata keyword contained in the GnuPG based statusfile to `parse_gpg_statusfile()` so that it is also run when creating the statusfile in `verify_file_signature()` and not only when running `verify_git_signature()`. Signed-off-by: David Runge <dvzrv@archlinux.org>
This commit is contained in:
parent
86ec26b2d3
commit
16a064701a
1 changed files with 7 additions and 5 deletions
|
@ -223,17 +223,19 @@ verify_git_signature() {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -qs NEWSIG "$statusfile"; then
|
|
||||||
printf '%s\n' "$(gettext "SIGNATURE NOT FOUND")" >&2
|
|
||||||
errors=1
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_gpg_statusfile() {
|
parse_gpg_statusfile() {
|
||||||
local type arg1 arg6 arg10
|
local type arg1 arg6 arg10
|
||||||
|
|
||||||
|
# ensure the NEWSIG keyword is part of the metadata
|
||||||
|
if ! grep -qs NEWSIG "$statusfile"; then
|
||||||
|
printf '%s\n' "$(gettext "SIGNATURE NOT FOUND")" >&2
|
||||||
|
errors=1
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
while read -r _ type arg1 _ _ _ _ arg6 _ _ _ arg10 _; do
|
while read -r _ type arg1 _ _ _ _ arg6 _ _ _ arg10 _; do
|
||||||
case "$type" in
|
case "$type" in
|
||||||
GOODSIG)
|
GOODSIG)
|
||||||
|
|
Loading…
Add table
Reference in a new issue