summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/apk_package.h4
-rw-r--r--src/database.c4
2 files changed, 3 insertions, 5 deletions
diff --git a/src/apk_package.h b/src/apk_package.h
index 83bbd70..41d65cb 100644
--- a/src/apk_package.h
+++ b/src/apk_package.h
@@ -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;
diff --git a/src/database.c b/src/database.c
index fee8788..482f406 100644
--- a/src/database.c
+++ b/src/database.c
@@ -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);