summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2008-12-14 19:28:59 +0000
committerJason Woodward2008-12-14 19:28:59 +0000
commitc86089e2555fcc5afb5428bc78f0a959c361b56f (patch)
tree2c94c8775cff4ae264bbbe58f63da9f4d3d6a3fb
parentfcd4b73aaba68ac0157b707987cae6dfd3318174 (diff)
downloadgslapt-c86089e2555fcc5afb5428bc78f0a959c361b56f.tar.gz
updated for libslapt 0.10.1 compatibility
-rw-r--r--ChangeLog3
-rw-r--r--configure.in5
-rw-r--r--src/callbacks.c8
3 files changed, 10 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index ff24111..73735b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
-0.5.1 Dec 13, 2008
+0.5.1 Dec 14, 2008
+ * updated for libslapt 0.10.1 compatibility
* use the actual file extension when printing the package name while downloading
* fixed the show upgradeable view to account for package priorities
diff --git a/configure.in b/configure.in
index c3aec89..0d92e81 100644
--- a/configure.in
+++ b/configure.in
@@ -34,12 +34,13 @@ AC_CHECK_HEADER(slapt.h, [], [AC_MSG_ERROR(libslapt headers are missing)])
AC_CHECK_LIB(z,gzopen, [LIBS="$LIBS -lz"], [AC_MSG_ERROR(libz is missing)])
AC_CHECK_LIB(curl,curl_global_init, [LIBS="$LIBS `curl-config --libs`"], [AC_MSG_ERROR(curl libs are missing)])
AC_CHECK_LIB(gpgme,gpgme_new, [
- LIBS="$LIBS `gpgme-config --libs`"
+ LIBS="`gpgme-config --libs` $LIBS"
AC_CHECK_LIB(slapt,slapt_add_pkg_source_gpg_key,
[AC_DEFINE(SLAPT_HAS_GPGME, 1, [libslapt has builtin gpgme support])],
[AC_MSG_WARN(libslapt does not have gpgme support)])
], [AC_MSG_WARN(gpg support disabled)])
-AC_CHECK_LIB(slapt,slapt_priority_to_str, [], [AC_MSG_ERROR(libslapt 0.10.0 or greater is required)])
+dnl AC_CHECK_LIB(slapt,slapt_priority_to_str, [], [AC_MSG_ERROR(libslapt 0.10.0 or greater is required)])
+AC_CHECK_MEMBER([slapt_rc_config.use_priority], [LIBS="$LIBS -lslapt"], [AC_MSG_ERROR([libslapt 0.10.1 or greater is required])], [[#include <slapt.h>]])
LIBS="$LIBS -lglib-2.0 -lgthread-2.0"
diff --git a/src/callbacks.c b/src/callbacks.c
index 2d8d32b..9809743 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -425,8 +425,7 @@ void add_pkg_for_removal (GtkWidget *gslapt, gpointer user_data)
}
}
- free(deps->pkgs);
- free(deps);
+ slapt_free_pkg_list(deps);
}
@@ -1302,7 +1301,10 @@ static void get_package_data (void)
patch_pkgs->pkgs[pkg_i]->mirror = strdup(global_config->sources->src[i]->url);
}
/* set the priority of the package based on the source, plus 1 for the patch priority */
- patch_pkgs->pkgs[pkg_i]->priority = source_priority + 1;
+ if (global_config->use_priority == SLAPT_TRUE)
+ patch_pkgs->pkgs[pkg_i]->priority = source_priority + 1;
+ else
+ patch_pkgs->pkgs[pkg_i]->priority = source_priority;
slapt_add_pkg_to_pkg_list(new_pkgs,patch_pkgs->pkgs[pkg_i]);
}