diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/database.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/database.c b/src/database.c index 7421e1b..11864cb 100644 --- a/src/database.c +++ b/src/database.c @@ -2100,6 +2100,12 @@ int apk_db_install_pkg(struct apk_database *db, /* Install the new stuff */ ipkg = apk_pkg_install(db, newpkg); + ipkg->flags |= APK_IPKGF_RUN_ALL_TRIGGERS; + if (ipkg->triggers->num != 0) { + list_del(&ipkg->trigger_pkgs_list); + apk_string_array_free(&ipkg->triggers); + } + if (newpkg->installed_size != 0) { r = apk_db_unpack_pkg(db, ipkg, (oldpkg != NULL), (oldpkg == newpkg), cb, cb_ctx, @@ -2110,12 +2116,6 @@ int apk_db_install_pkg(struct apk_database *db, } } - ipkg->flags |= APK_IPKGF_RUN_ALL_TRIGGERS; - if (ipkg->triggers->num != 0) { - list_del(&ipkg->trigger_pkgs_list); - apk_string_array_free(&ipkg->triggers); - } - if (oldpkg != NULL && oldpkg != newpkg && oldpkg->ipkg != NULL) { apk_db_purge_pkg(db, oldpkg->ipkg, NULL); apk_pkg_uninstall(db, oldpkg); |