summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2008-12-14 00:25:21 +0000
committerJason Woodward2008-12-14 00:25:21 +0000
commit501e081f4945a706fcb798ad28a7ec83f3ed3d18 (patch)
tree197e1442fe31dcf28bb2e811cd9bf4ecdf611116
parentfdf61754194134d66502ef094525e52aa683da8e (diff)
downloadgslapt-501e081f4945a706fcb798ad28a7ec83f3ed3d18.tar.gz
fixed the show upgradeable view to account for package priorities
-rw-r--r--ChangeLog3
-rw-r--r--configure.in2
-rw-r--r--src/callbacks.c9
3 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 524c737..40eaae4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
+0.5.1 Dec 13, 2008
+ * fixed the show upgradeable view to account for package priorities
+
0.5.0 Dec 07, 2008
* fixed removing uninstalled dependencies when removing packages
* added priority to source management
diff --git a/configure.in b/configure.in
index 70ef813..c3aec89 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([configure.in])
-AM_INIT_AUTOMAKE(gslapt, 0.5.0)
+AM_INIT_AUTOMAKE(gslapt, 0.5.1)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
diff --git a/src/callbacks.c b/src/callbacks.c
index 351a350..b2dade4 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -462,9 +462,16 @@ void build_package_treeviewlist (GtkWidget *treeview)
gboolean is_inst = FALSE, is_an_upgrade = FALSE;
GdkPixbuf *status_icon = NULL;
gchar *short_desc = slapt_gen_short_pkg_description(all->pkgs[i]);
- slapt_pkg_info_t *installed_pkg = NULL;
+ slapt_pkg_info_t *installed_pkg = NULL, *newer_available_pkg = NULL;
gchar *location = NULL;
+ /* we need to see if there is another available package
+ that is newer than this one */
+ if ( (newer_available_pkg = slapt_get_newest_pkg(all, all->pkgs[i]->name)) != NULL) {
+ if ( slapt_cmp_pkgs(all->pkgs[i], newer_available_pkg) < 0 )
+ continue;
+ }
+
installed_pkg = slapt_get_newest_pkg(installed,all->pkgs[i]->name);
if (installed_pkg != NULL) {
int cmp = slapt_cmp_pkgs(all->pkgs[i], installed_pkg);