diff options
author | Chantry Xavier <shiningxc@gmail.com> | 2008-01-22 01:28:05 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-01-21 19:35:43 -0600 |
commit | b2914bf0af388f369865859292b1c7342e785303 (patch) | |
tree | e0433b54d7a9d7e0bc07bed1830e940bfc663c9c /lib/libalpm/alpm.h | |
parent | 927af790ee3ff1495acd2c6b33378a7ab20e0c67 (diff) | |
download | pacman-b2914bf0af388f369865859292b1c7342e785303.tar.xz |
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>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r-- | lib/libalpm/alpm.h | 2 |
1 files changed, 1 insertions, 1 deletions
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); |