summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2018-07-11 00:37:16 +0000
committerJason Woodward2018-07-10 21:28:54 -0400
commitd333df34001ac847d42c6df2a1e6ba5e31efa6cf (patch)
treec640a202340fe56e3c9f602302453e0500391439
parent69ee231e6b93e29a27d6873f000c6432913e1d5d (diff)
downloadslapt-get-d333df34001ac847d42c6df2a1e6ba5e31efa6cf.tar.gz
fix slapt_is_excluded check
-rw-r--r--src/action.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/action.c b/src/action.c
index affd0de..9ff34b2 100644
--- a/src/action.c
+++ b/src/action.c
@@ -292,14 +292,13 @@ void slapt_pkg_action_remove(const slapt_rc_config *global_config,
}
if (global_config->remove_obsolete == true) {
- slapt_pkg_list_t *obsolete = slapt_get_obsolete_pkgs(
- global_config, avail_pkgs, installed_pkgs);
+ slapt_pkg_list_t *obsolete = slapt_get_obsolete_pkgs(global_config, avail_pkgs, installed_pkgs);
slapt_pkg_list_t_foreach(pkg, obsolete) {
if (slapt_is_excluded(global_config, pkg)) {
- slapt_add_remove_to_transaction(tran, pkg);
- } else {
slapt_add_exclude_to_transaction(tran, pkg);
+ } else {
+ slapt_add_remove_to_transaction(tran, pkg);
}
}
@@ -579,15 +578,14 @@ void slapt_pkg_action_upgrade_all(const slapt_rc_config *global_config)
slapt_free_pkg_list(matches);
/* remove obsolete packages if prompted to */
- if (global_config->remove_obsolete == true) {
- slapt_pkg_list_t *obsolete = slapt_get_obsolete_pkgs(
- global_config, avail_pkgs, installed_pkgs);
+ if (global_config->remove_obsolete) {
+ slapt_pkg_list_t *obsolete = slapt_get_obsolete_pkgs(global_config, avail_pkgs, installed_pkgs);
slapt_pkg_list_t_foreach(obsolete_pkg, obsolete) {
- if (!slapt_is_excluded(global_config, obsolete_pkg)) {
- slapt_add_remove_to_transaction(tran, obsolete_pkg);
- } else {
+ if (slapt_is_excluded(global_config, obsolete_pkg)) {
slapt_add_exclude_to_transaction(tran, obsolete_pkg);
+ } else {
+ slapt_add_remove_to_transaction(tran, obsolete_pkg);
}
}