summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/be_sync.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 621321d1..25c8cbec 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -198,6 +198,11 @@ int SYMEXPORT alpm_db_update(int force, alpm_db_t *db)
return -1;
}
+ /* force update of invalid databases to fix potential mismatched database/signature */
+ if(db->status & DB_STATUS_INVALID) {
+ force = 1;
+ }
+
/* make sure we have a sane umask */
oldmask = umask(0022);