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/conflict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/conflict.c') diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index 0fad4e4a..f666d595 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -93,7 +93,7 @@ static int does_conflict(pmpkg_t *pkg1, const char *conflict, pmpkg_t *pkg2) { const char *pkg1name = alpm_pkg_get_name(pkg1); const char *pkg2name = alpm_pkg_get_name(pkg2); - pmdepend_t *conf = alpm_splitdep(conflict); + pmdepend_t *conf = _alpm_splitdep(conflict); int match = 0; match = alpm_depcmp(pkg2, conf); -- cgit v1.2.3-24-g4f1b