Move the deptest code from frontend to backend.
commitb2914bf0af388f369865859292b1c7342e785303
authorChantry Xavier <shiningxc@gmail.com>
Tue, 22 Jan 2008 00:28:05 +0000 (22 01:28 +0100)
committerDan McGee <dan@archlinux.org>
Tue, 22 Jan 2008 01:35:43 +0000 (21 19:35 -0600)
treee0433b54d7a9d7e0bc07bed1830e940bfc663c9c
parent927af790ee3ff1495acd2c6b33378a7ab20e0c67
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 <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
lib/libalpm/alpm.h
lib/libalpm/be_files.c
lib/libalpm/conflict.c
lib/libalpm/deps.c
lib/libalpm/deps.h
lib/libalpm/package.c
pactest/tests/deptest001.py
src/pacman/deptest.c