summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/be_sync.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 1b7c8b6f..429ca4ce 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -486,6 +486,8 @@ static int sync_db_populate(alpm_db_t *db)
fd = _alpm_open_archive(db->handle, dbpath, &buf,
&archive, ALPM_ERR_DB_OPEN);
if(fd < 0) {
+ db->status &= ~DB_STATUS_VALID;
+ db->status |= DB_STATUS_INVALID;
return -1;
}
est_count = estimate_package_count(&buf, archive);