Commit 3e8dc3da authored by Timo Teräs's avatar Timo Teräs

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.
parent bbc31806
......@@ -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. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment