From b2914bf0af388f369865859292b1c7342e785303 Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Tue, 22 Jan 2008 01:28:05 +0100 Subject: Move the deptest code from frontend to backend. The deptest code (pacman -T) used by makepkg was mostly in the frontend. There were 2 drawbacks: 1) the public splitdep function returns a pmdepend_t struct, but the _alpm_dep_free function for freeing it is private. So there was a memleak. 2) there is a helper in the backend (satisfycmp in deps.c) which makes this function much easier. So this adds a new public alpm_deptest in libalpm/deps.c, which cleans pacman_deptest in pacman/deptest.c a lot. Besides, alpm_splitdep was made private, because the frontend no longer requires it, and _alpm_dep_free is also private. Finally the deptest001 pactest was extended. Signed-off-by: Chantry Xavier Signed-off-by: Dan McGee --- lib/libalpm/deps.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/deps.h') diff --git a/lib/libalpm/deps.h b/lib/libalpm/deps.h index debd5347..fdbfebed 100644 --- a/lib/libalpm/deps.h +++ b/lib/libalpm/deps.h @@ -56,7 +56,9 @@ void _alpm_depmiss_free(pmdepmissing_t *miss); alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode); void _alpm_recursedeps(pmdb_t *db, alpm_list_t *targs, int include_explicit); int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg, - alpm_list_t **list, alpm_list_t *remove, pmtrans_t *trans, alpm_list_t **data); + alpm_list_t **list, alpm_list_t *remove, pmtrans_t *trans, alpm_list_t + **data); +pmdepend_t *_alpm_splitdep(const char *depstring); #endif /* _ALPM_DEPS_H */ -- cgit v1.2.3-24-g4f1b