[pacman-dev] [PATCH 4/6] Add --verify option for signature level

Rémy Oudompheng remyoudompheng at gmail.com
Sun May 29 03:46:05 EDT 2011


On Sat 28 May 2011 at 22:37 +0800, Pang Yan Han wrote:
> +		case OP_VERIFY:
> +			if (!strcmp(optarg, "always")) {
> +				alpm_option_set_default_sigverify(PM_PGP_VERIFY_ALWAYS);
> +			} else if (!strcmp(optarg, "optional")) {
> +				alpm_option_set_default_sigverify(PM_PGP_VERIFY_OPTIONAL);
> +			} else if (!strcmp(optarg, "never")) {
> +				alpm_option_set_default_sigverify(PM_PGP_VERIFY_NEVER);
> +			} else {
> +				pm_printf(PM_LOG_ERROR, _("'%s' is not a valid verify level\n"),
> +						optarg);
> +				return 1;
> +			}
> +
> +			break;
>

You could have used the option_verifysig() function from conf.c.

Maybe it would be better to store that value in a new field of the config
structure (same thing in conf.c) so that it would get applied in a
similar way as with setlibpaths().

-- 
Rémy.


More information about the pacman-dev mailing list