summaryrefslogtreecommitdiff
path: root/src/util/testpkg.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-21 23:39:01 -0500
committerDan McGee <dan@archlinux.org>2011-04-24 10:48:34 -0500
commit4d63ebe2fbe932412a7b8340af49bf30c8e17a91 (patch)
tree83555011c2e8205a4243ac389647af50e964761e /src/util/testpkg.c
parent1cf79eb8c8c7894d238cd906613dc1cd5b7ced1a (diff)
downloadpacman-4d63ebe2fbe932412a7b8340af49bf30c8e17a91.tar.xz
Perform package verification at package load time
Both md5sum verification and PGP verification can and should be done at package load time. This allows verification to happen as early as possible for packages provided by filename and loaded in the frontend, and moves more stuff out of sync_commit that doesn't really belong there. This should also set the stage for simplified parallel loading of packages later down the road. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/util/testpkg.c')
-rw-r--r--src/util/testpkg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/testpkg.c b/src/util/testpkg.c
index e562dde2..ad6ec30b 100644
--- a/src/util/testpkg.c
+++ b/src/util/testpkg.c
@@ -55,7 +55,8 @@ int main(int argc, char *argv[])
/* let us get log messages from libalpm */
alpm_option_set_logcb(output_cb);
- if(alpm_pkg_load(argv[1], 1, &pkg) == -1 || pkg == NULL) {
+ if(alpm_pkg_load(argv[1], 1, PM_PGP_VERIFY_OPTIONAL, &pkg) == -1
+ || pkg == NULL) {
switch(pm_errno) {
case PM_ERR_PKG_OPEN:
printf("Cannot open the given file.\n");