From 4d63ebe2fbe932412a7b8340af49bf30c8e17a91 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 21 Apr 2011 23:39:01 -0500 Subject: 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 --- src/pacman/upgrade.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/pacman/upgrade.c') diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c index 5b894001..0ffc94c4 100644 --- a/src/pacman/upgrade.c +++ b/src/pacman/upgrade.c @@ -42,6 +42,7 @@ int pacman_upgrade(alpm_list_t *targets) { alpm_list_t *i, *data = NULL; + pgp_verify_t check_sig = alpm_option_get_default_sigverify(); int retval = 0; if(targets == NULL) { @@ -75,7 +76,7 @@ int pacman_upgrade(alpm_list_t *targets) char *targ = alpm_list_getdata(i); pmpkg_t *pkg; - if(alpm_pkg_load(targ, 1, &pkg) != 0) { + if(alpm_pkg_load(targ, 1, check_sig, &pkg) != 0) { pm_fprintf(stderr, PM_LOG_ERROR, "'%s': %s\n", targ, alpm_strerrorlast()); trans_release(); -- cgit v1.2.3