require actual siglevel for default
ALPM_SIG_USE_DEFAULT does not refer to an actual siglevel, rather it indicates that the global default should be used in place of the operation-specific one. Setting this value for the global default itself makes no sense. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
61fe738043
commit
44cfc09511
1 changed files with 4 additions and 1 deletions
|
@ -803,10 +803,13 @@ int SYMEXPORT alpm_option_set_default_siglevel(alpm_handle_t *handle,
|
|||
int level)
|
||||
{
|
||||
CHECK_HANDLE(handle, return -1);
|
||||
if(level == ALPM_SIG_USE_DEFAULT) {
|
||||
RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1);
|
||||
}
|
||||
#ifdef HAVE_LIBGPGME
|
||||
handle->siglevel = level;
|
||||
#else
|
||||
if(level != 0 && level != ALPM_SIG_USE_DEFAULT) {
|
||||
if(level != 0) {
|
||||
RET_ERR(handle, ALPM_ERR_MISSING_CAPABILITY_SIGNATURES, -1);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue