summaryrefslogtreecommitdiffstats
path: root/expac.c
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-02-06 22:16:54 -0500
committerDave Reisner <d@falconindy.com>2011-02-06 22:16:54 -0500
commit6009462840af7baf3700568d34aed325ee854b2a (patch)
tree893b274dc23b4b55f5f1d67c137a7b71e5cf4009 /expac.c
parent349fe9dff7726c7f3831406a16d63c040458b916 (diff)
downloadexpac-6009462840af7baf3700568d34aed325ee854b2a.tar.xz
use alpm_db_get_pkgcache_list if available
Diffstat (limited to 'expac.c')
-rw-r--r--expac.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/expac.c b/expac.c
index e66f456..6dfb7e6 100644
--- a/expac.c
+++ b/expac.c
@@ -492,7 +492,11 @@ alpm_list_t *resolve_pkg(alpm_list_t *targets) {
} else { /* dump full DBs */
for (r = dblist; r; r = alpm_list_next(r)) {
/* joining causes corruption on alpm_release(), so we copy */
+#ifdef _HAVE_ALPM_DB_GET_PKGCACHE_LIST
+ ret = alpm_list_join(ret, alpm_list_copy(alpm_db_get_pkgcache_list(alpm_list_getdata(r))));
+#else
ret = alpm_list_join(ret, alpm_list_copy(alpm_db_get_pkgcache(alpm_list_getdata(r))));
+#endif
}
}
} else {
@@ -514,10 +518,10 @@ alpm_list_t *resolve_pkg(alpm_list_t *targets) {
}
pkg = alpm_db_get_pkg(repo, pkgname);
-#ifdef _HAVE_ALPM_FIND_SATISFIER
+#if defined(_HAVE_ALPM_FIND_SATISFIER) && defined(_HAVE_ALPM_DB_GET_PKGCACHE_LIST)
/* try to resolve as provide (e.g. awk => gawk) */
if (!pkg) {
- pkg = alpm_find_satisfier(alpm_db_get_pkgcache(repo), pkgname);
+ pkg = alpm_find_satisfier(alpm_db_get_pkgcache_list(repo), pkgname);
}
#endif