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/alpm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/alpm.h') diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 4797fcfa..49580c0e 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -377,10 +377,10 @@ typedef enum _pmdepmod_t { PM_DEP_MOD_LT } pmdepmod_t; -pmdepend_t *alpm_splitdep(const char *depstring); int alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep); alpm_list_t *alpm_checkdeps(pmdb_t *db, int reversedeps, alpm_list_t *remove, alpm_list_t *upgrade); +alpm_list_t *alpm_deptest(pmdb_t *db, alpm_list_t *targets); const char *alpm_miss_get_target(const pmdepmissing_t *miss); pmdepend_t *alpm_miss_get_dep(pmdepmissing_t *miss); -- cgit v1.2.3-54-g00ecf