summaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-12-22 17:33:44 +0200
committerTimo Teras <timo.teras@iki.fi>2009-12-22 17:33:44 +0200
commitb58ec46f7cc53cbea580a87a6bf9da0c8b0fdc26 (patch)
treef72420ebc564281301004cd233bc23cd7335f510 /src/database.c
parentd4f0b2ab70e3731b942569c754f6ae7280132c13 (diff)
downloadapk-tools-b58ec46f7cc53cbea580a87a6bf9da0c8b0fdc26.tar.gz
apk-tools-b58ec46f7cc53cbea580a87a6bf9da0c8b0fdc26.tar.bz2
apk-tools-b58ec46f7cc53cbea580a87a6bf9da0c8b0fdc26.tar.xz
apk-tools-b58ec46f7cc53cbea580a87a6bf9da0c8b0fdc26.zip
db: make fdb load package description before calling pkg_install
this is now mandatory after the overlay fixes. otherwise the package will not get listed as installed.
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/database.c b/src/database.c
index 1c6ae9e..5118f5c 100644
--- a/src/database.c
+++ b/src/database.c
@@ -581,13 +581,9 @@ int apk_db_index_read(struct apk_database *db, struct apk_bstream *bs, int repo)
/* If no package, create new */
if (pkg == NULL) {
pkg = apk_pkg_new();
+ ipkg = NULL;
diri = NULL;
file_diri_node = NULL;
-
- if (repo == -1) {
- ipkg = apk_pkg_install(db, pkg);
- diri_node = hlist_tail_ptr(&ipkg->owned_dirs);
- }
}
/* Standard index line? */
@@ -598,6 +594,10 @@ int apk_db_index_read(struct apk_database *db, struct apk_bstream *bs, int repo)
apk_error("Invalid index entry '%c'", field);
return -1;
}
+ if (ipkg == NULL) {
+ ipkg = apk_pkg_install(db, pkg);
+ diri_node = hlist_tail_ptr(&ipkg->owned_dirs);
+ }
/* Check FDB special entries */
switch (field) {