diff options
author | Timo Teräs <timo.teras@iki.fi> | 2011-10-19 15:26:55 -0400 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2011-10-19 15:26:55 -0400 |
commit | 8d4d68d8187abc52bad0549f9edafbd8cba2e358 (patch) | |
tree | d6c82096abb06e8822cf801470c0d7aa924466a3 /src | |
parent | 89d003f8c2e5a92655ee778f7bfa5c0e85ddbed4 (diff) | |
download | apk-tools-8d4d68d8187abc52bad0549f9edafbd8cba2e358.tar.gz apk-tools-8d4d68d8187abc52bad0549f9edafbd8cba2e358.tar.bz2 apk-tools-8d4d68d8187abc52bad0549f9edafbd8cba2e358.tar.xz apk-tools-8d4d68d8187abc52bad0549f9edafbd8cba2e358.zip |
pkg: convert struct apk_install_package flags to bitfield
Diffstat (limited to 'src')
-rw-r--r-- | src/apk_package.h | 4 | ||||
-rw-r--r-- | src/database.c | 4 |
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); |