summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-01-06 10:35:04 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-01-06 10:35:04 +0200
commit3e8dc3da097c206518a8a9105c1569a4fa17327c (patch)
tree78d0d186066a9099a4e6836f06ef3d03fa9a9b58 /src
parentbbc31806b9008b4756757f76615220400f4178a6 (diff)
downloadapk-tools-3e8dc3da097c206518a8a9105c1569a4fa17327c.tar.gz
apk-tools-3e8dc3da097c206518a8a9105c1569a4fa17327c.tar.bz2
apk-tools-3e8dc3da097c206518a8a9105c1569a4fa17327c.tar.xz
apk-tools-3e8dc3da097c206518a8a9105c1569a4fa17327c.zip
db: properly detect when pkg install trigger needs executing
call apk_pkg_install() and hlist_tail_ptr() only once. the latter is O(n) and can get very slow.
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 3435eaf..0c62b4d 100644
--- a/src/database.c
+++ b/src/database.c
@@ -626,7 +626,7 @@ int apk_db_index_read(struct apk_database *db, struct apk_bstream *bs, int repo)
if (r == 0) {
continue;
}
- if (r == 1 && repo == -1) {
+ if (r == 1 && repo == -1 && ipkg == NULL) {
/* Instert to installed database; this needs to
* happen after package name has been read, but
* before first FDB entry. */