pkg: convert struct apk_install_package flags to bitfield
parent
89d003f8c2
commit
8d4d68d818
|
@ -63,11 +63,9 @@ struct apk_dependency {
|
||||||
};
|
};
|
||||||
APK_ARRAY(apk_dependency_array, struct apk_dependency);
|
APK_ARRAY(apk_dependency_array, struct apk_dependency);
|
||||||
|
|
||||||
#define APK_IPKGF_RUN_ALL_TRIGGERS 0x00000001
|
|
||||||
|
|
||||||
struct apk_installed_package {
|
struct apk_installed_package {
|
||||||
struct apk_package *pkg;
|
struct apk_package *pkg;
|
||||||
unsigned int flags;
|
unsigned int run_all_triggers : 1;
|
||||||
unsigned short replaces_priority;
|
unsigned short replaces_priority;
|
||||||
struct list_head installed_pkgs_list;
|
struct list_head installed_pkgs_list;
|
||||||
struct list_head trigger_pkgs_list;
|
struct list_head trigger_pkgs_list;
|
||||||
|
|
|
@ -1451,7 +1451,7 @@ static int fire_triggers(apk_hash_item item, void *ctx)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
list_for_each_entry(ipkg, &db->installed.triggers, trigger_pkgs_list) {
|
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))
|
((dbd->flags & APK_DBDIRF_MODIFIED) == 0))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -2254,7 +2254,7 @@ int apk_db_install_pkg(struct apk_database *db,
|
||||||
|
|
||||||
/* Install the new stuff */
|
/* Install the new stuff */
|
||||||
ipkg = apk_pkg_install(db, newpkg);
|
ipkg = apk_pkg_install(db, newpkg);
|
||||||
ipkg->flags |= APK_IPKGF_RUN_ALL_TRIGGERS;
|
ipkg->run_all_triggers = 1;
|
||||||
if (ipkg->triggers->num != 0) {
|
if (ipkg->triggers->num != 0) {
|
||||||
list_del(&ipkg->trigger_pkgs_list);
|
list_del(&ipkg->trigger_pkgs_list);
|
||||||
list_init(&ipkg->trigger_pkgs_list);
|
list_init(&ipkg->trigger_pkgs_list);
|
||||||
|
|
Loading…
Reference in New Issue