aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2010-06-02 00:47:51 -0400
committerJason Woodward2010-06-02 19:49:56 -0400
commit50eb8c82e09e1f4beb2941c36ec9530285bbc7b4 (patch)
tree7d49ff55af8cafc744f5c689a7b9d3db4c45a10f
parent11397e429f859af73c4349333bd57b13a2a15728 (diff)
downloadslapt-get-50eb8c82e09e1f4beb2941c36ec9530285bbc7b4.tar.gz
always reinstall slapt-get on dist-upgrade
-rw-r--r--ChangeLog1
-rw-r--r--src/action.c12
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index ef2a090..7bcc7b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
0.10.2e May 25, 2010
+ * always reinstall slapt-get on dist-upgrade
* translations cleanup
* FAQ updates
diff --git a/src/action.c b/src/action.c
index e11996b..1997d9c 100644
--- a/src/action.c
+++ b/src/action.c
@@ -489,6 +489,7 @@ void slapt_pkg_action_upgrade_all(const slapt_rc_config *global_config)
if ( global_config->dist_upgrade == SLAPT_TRUE ) {
char *essential[] = {"glibc-solibs","sed","pkgtools",NULL};
int epi = 0;
+ slapt_pkg_info_t *newest_slaptget = NULL;
struct slapt_pkg_list *matches =
slapt_search_pkg_list(avail_pkgs,SLAPT_SLACK_BASE_SET_REGEX);
@@ -622,10 +623,13 @@ void slapt_pkg_action_upgrade_all(const slapt_rc_config *global_config)
}/* end if remove_obsolete */
/* insurance so that all of slapt-get's requirements are also installed */
- slapt_add_deps_to_trans(
- global_config,tran,avail_pkgs,installed_pkgs,
- slapt_get_newest_pkg(avail_pkgs,"slapt-get")
- );
+ newest_slaptget = slapt_get_newest_pkg(avail_pkgs,"slapt-get");
+ if (newest_slaptget != NULL) {
+ slapt_pkg_info_t *installed_slaptget = slapt_get_newest_pkg(installed_pkgs, "slapt-get");
+ slapt_add_deps_to_trans(global_config, tran, avail_pkgs, installed_pkgs, newest_slaptget);
+ if (installed_slaptget != NULL)
+ slapt_add_upgrade_to_transaction(tran,installed_slaptget, newest_slaptget);
+ }
}