db: check cache only if some repositories are enabled

cute-signatures
Timo Teräs 2020-10-01 14:31:41 +03:00
parent c538509a2a
commit c269e9c24d
1 changed files with 1 additions and 1 deletions

View File

@ -1706,7 +1706,7 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts)
apk_hash_foreach(&db->available.names, apk_db_name_rdepends, db);
}
if (apk_db_cache_active(db))
if (apk_db_cache_active(db) && (dbopts->open_flags & (APK_OPENF_NO_REPOS|APK_OPENF_NO_INSTALLED)) == 0)
apk_db_cache_foreach_item(db, mark_in_cache);
db->open_complete = 1;