summaryrefslogtreecommitdiffstats
path: root/db-functions
diff options
context:
space:
mode:
Diffstat (limited to 'db-functions')
-rw-r--r--db-functions15
1 files changed, 15 insertions, 0 deletions
diff --git a/db-functions b/db-functions
index a3e2168..7c4a7fe 100644
--- a/db-functions
+++ b/db-functions
@@ -466,6 +466,21 @@ check_repo_permission() {
return 0
}
+check_pkgsig() {
+ local signature=$1
+ local ret=1
+ local fd="$(mktemp --tmpdir="${WORKDIR}")"
+
+ exec 4>"${fd}"
+ gpg --homedir /etc/pacman.d/gnupg/ --status-fd 4 --verify "${signature}" >/dev/null 2>&1
+ exec 4>&-
+ if grep -q TRUST_FULLY "${fd}"; then
+ ret=0
+ fi
+
+ return $ret
+}
+
set_repo_permission() {
local repo=$1
local arch=$2