summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2020-10-03 15:38:35 +0300
committerTimo Teräs <timo.teras@iki.fi>2020-10-05 16:49:57 +0300
commit7c2a3657fb4b6a1a8f5321e418a0a6baf10627e1 (patch)
tree85ca6c3101f007f5652d1bb926b29a2a1d496e1d /src
parent6cedfe27ac566e7de7d0c24778c4280e8311bbec (diff)
downloadapk-tools-7c2a3657fb4b6a1a8f5321e418a0a6baf10627e1.tar.gz
apk-tools-7c2a3657fb4b6a1a8f5321e418a0a6baf10627e1.tar.bz2
apk-tools-7c2a3657fb4b6a1a8f5321e418a0a6baf10627e1.tar.xz
apk-tools-7c2a3657fb4b6a1a8f5321e418a0a6baf10627e1.zip
db: make --repositories-file relative to host root
It used to be relative to the --root specified root, but that causes issues with relative command line filenames and is unintuitive. Update documentation accordingly. Fixes #10702.
Diffstat (limited to 'src')
-rw-r--r--src/database.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c
index 29e8ea9..e064ca5 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1700,7 +1700,7 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts)
apk_dir_foreach_file(openat(db->root_fd, "etc/apk/repositories.d", O_RDONLY | O_CLOEXEC),
add_repos_from_file, db);
} else {
- add_repos_from_file(db, db->root_fd, dbopts->repositories_file);
+ add_repos_from_file(db, AT_FDCWD, dbopts->repositories_file);
}
if (db->repo_update_counter)