diff options
author | Timo Teräs <timo.teras@iki.fi> | 2010-10-08 16:09:03 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2010-10-08 16:09:03 +0300 |
commit | 6398d338c6441f3b967a2633bbc9df4709bcb258 (patch) | |
tree | 851729b8c819ad15c62e066953407c24814bad6e /src/database.c | |
parent | 19419f1a88285a0dee53bdf49201c4d3d4cbf19f (diff) | |
download | apk-tools-6398d338c6441f3b967a2633bbc9df4709bcb258.tar.gz apk-tools-6398d338c6441f3b967a2633bbc9df4709bcb258.tar.bz2 apk-tools-6398d338c6441f3b967a2633bbc9df4709bcb258.tar.xz apk-tools-6398d338c6441f3b967a2633bbc9df4709bcb258.zip |
db: fix the previous commit
id cache needs to be initialized early. and group database filename
is surprisingly 'group'.
Diffstat (limited to 'src/database.c')
-rw-r--r-- | src/database.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database.c b/src/database.c index f0b8cb6..e22289a 100644 --- a/src/database.c +++ b/src/database.c @@ -1079,6 +1079,8 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts) S_ISDIR(st.st_mode) && major(st.st_dev) != 0) db->cache_dir = apk_linked_cache_dir; + apk_id_cache_init(&db->id_cache, db->root_fd); + if (dbopts->open_flags & APK_OPENF_WRITE) { db->lock_fd = openat(db->root_fd, "var/lib/apk/lock", O_CREAT | O_RDWR | O_CLOEXEC, 0400); @@ -1177,8 +1179,6 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts) goto ret_r; } - apk_id_cache_init(&db->id_cache, db->root_fd); - return rr; ret_errno: |