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.
cute-signatures
Timo Teräs 2012-01-06 10:35:04 +02:00
parent bbc31806b9
commit 3e8dc3da09
1 changed files with 1 additions and 1 deletions

View File

@ -626,7 +626,7 @@ int apk_db_index_read(struct apk_database *db, struct apk_bstream *bs, int repo)
if (r == 0) { if (r == 0) {
continue; continue;
} }
if (r == 1 && repo == -1) { if (r == 1 && repo == -1 && ipkg == NULL) {
/* Instert to installed database; this needs to /* Instert to installed database; this needs to
* happen after package name has been read, but * happen after package name has been read, but
* before first FDB entry. */ * before first FDB entry. */