summaryrefslogtreecommitdiffstats
path: root/src/index.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-08-05 09:28:25 +0300
committerTimo Teras <timo.teras@iki.fi>2009-08-05 09:28:25 +0300
commitbb77b01244d42ef669212fc1d3cf11590135fc12 (patch)
tree8054570159e2f81d4d4cf345aef1a55fe9e68b99 /src/index.c
parenta602c49b31e92466ea42e2968833d3e6908a18c1 (diff)
downloadapk-tools-bb77b01244d42ef669212fc1d3cf11590135fc12.tar.bz2
apk-tools-bb77b01244d42ef669212fc1d3cf11590135fc12.tar.xz
index: root is needed for signing keys
so initialize db with a root, but avoid loading state or repositories.
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c
index 4ef8aef..d9cecfe 100644
--- a/src/index.c
+++ b/src/index.c
@@ -99,7 +99,7 @@ static int index_main(void *ctx, int argc, char **argv)
if (ictx->method == 0)
ictx->method = APK_SIGN_GENERATE;
- apk_db_open(&db, NULL, APK_OPENF_READ);
+ apk_db_open(&db, apk_root, APK_OPENF_READ | APK_OPENF_NO_STATE | APK_OPENF_NO_REPOS);
if ((r = index_read_file(&db, ictx)) < 0) {
apk_db_close(&db);
apk_error("%s: %s", ictx->index, apk_error_str(r));