mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
Ensure database validity flags are set in invalid signature case
We returned the right error code but never set the flags accordingly. Also, now that we can bail early, ensure we set the error code. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
1e0ed133f4
commit
c406949226
@ -75,6 +75,7 @@ static int sync_db_validate(alpm_db_t *db)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if(db->status & DB_STATUS_INVALID) {
|
if(db->status & DB_STATUS_INVALID) {
|
||||||
|
db->handle->pm_errno = ALPM_ERR_DB_INVALID_SIG;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,6 +118,8 @@ static int sync_db_validate(alpm_db_t *db)
|
|||||||
} while(retry);
|
} while(retry);
|
||||||
|
|
||||||
if(ret) {
|
if(ret) {
|
||||||
|
db->status &= ~DB_STATUS_VALID;
|
||||||
|
db->status |= DB_STATUS_INVALID;
|
||||||
db->handle->pm_errno = ALPM_ERR_DB_INVALID_SIG;
|
db->handle->pm_errno = ALPM_ERR_DB_INVALID_SIG;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user