summaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2023-03-23 13:12:34 +0200
committerTimo Teräs <timo.teras@iki.fi>2023-04-11 20:55:13 +0300
commit4d8a920366143c38d5bc521470e353c11e788b04 (patch)
treecccb6d820a9bab4a0e57d030bef67c3576f36c95 /src/database.c
parent6c2af0f0d3381f1a2d12105e310ae47e120f5d4d (diff)
downloadapk-tools-4d8a920366143c38d5bc521470e353c11e788b04.tar.gz
apk-tools-4d8a920366143c38d5bc521470e353c11e788b04.tar.bz2
apk-tools-4d8a920366143c38d5bc521470e353c11e788b04.tar.xz
apk-tools-4d8a920366143c38d5bc521470e353c11e788b04.zip
db, dot, fetch, info, list, search: support --from=FROMSPEC
Allow omitting loading of system installed database and system repositories for the commands that operate on package indexes only.
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c
index 58c00d4..3b5bc38 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1726,10 +1726,12 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts)
}
}
- if (!(dbopts->open_flags & APK_OPENF_NO_SYS_REPOS)) {
+ if (!(dbopts->open_flags & APK_OPENF_NO_CMDLINE_REPOS)) {
list_for_each_entry(repo, &dbopts->repository_list, list)
apk_db_add_repository(db, APK_BLOB_STR(repo->url));
+ }
+ if (!(dbopts->open_flags & APK_OPENF_NO_SYS_REPOS)) {
if (dbopts->repositories_file == NULL) {
add_repos_from_file(db, db->root_fd, "etc/apk/repositories");
apk_dir_foreach_file(openat(db->root_fd, "etc/apk/repositories.d", O_RDONLY | O_CLOEXEC),