summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2020-10-01 14:31:41 +0300
committerTimo Teräs <timo.teras@iki.fi>2021-04-11 14:02:36 +0300
commit6a03e4cdb686e724bbc17bcff7d3013a0b323e54 (patch)
tree1e4efb3d16558a05f2204cf44597140aac634559
parentece78f1fe51d56752a9307b00f79bbf730f9d4cd (diff)
downloadapk-tools-6a03e4cdb686e724bbc17bcff7d3013a0b323e54.tar.gz
apk-tools-6a03e4cdb686e724bbc17bcff7d3013a0b323e54.tar.bz2
apk-tools-6a03e4cdb686e724bbc17bcff7d3013a0b323e54.tar.xz
apk-tools-6a03e4cdb686e724bbc17bcff7d3013a0b323e54.zip
db: check cache only if some repositories are enabled
(cherry picked from commit c269e9c24da57ab1b69ad6c80e9a1cb52b2b67d2)
-rw-r--r--src/database.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c
index af2aadd..0f23284 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1710,7 +1710,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;