Commit 8d4d68d8 authored by Timo Teräs's avatar Timo Teräs

pkg: convert struct apk_install_package flags to bitfield

parent 89d003f8
......@@ -63,11 +63,9 @@ struct apk_dependency {
};
APK_ARRAY(apk_dependency_array, struct apk_dependency);
#define APK_IPKGF_RUN_ALL_TRIGGERS 0x00000001
struct apk_installed_package {
struct apk_package *pkg;
unsigned int flags;
unsigned int run_all_triggers : 1;
unsigned short replaces_priority;
struct list_head installed_pkgs_list;
struct list_head trigger_pkgs_list;
......
......@@ -1451,7 +1451,7 @@ static int fire_triggers(apk_hash_item item, void *ctx)
int i;
list_for_each_entry(ipkg, &db->installed.triggers, trigger_pkgs_list) {
if (((ipkg->flags & APK_IPKGF_RUN_ALL_TRIGGERS) == 0) &&
if ((!ipkg->run_all_triggers) &&
((dbd->flags & APK_DBDIRF_MODIFIED) == 0))
continue;
......@@ -2254,7 +2254,7 @@ 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;
ipkg->run_all_triggers = 1;
if (ipkg->triggers->num != 0) {
list_del(&ipkg->trigger_pkgs_list);
list_init(&ipkg->trigger_pkgs_list);
......
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