From 3e8dc3da097c206518a8a9105c1569a4fa17327c Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Fri, 6 Jan 2012 10:35:04 +0200 Subject: 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. --- src/database.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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. */ -- cgit v1.2.3-70-g09d2