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 --- pactest/tests/deptest001.py | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'pactest/tests') diff --git a/pactest/tests/deptest001.py b/pactest/tests/deptest001.py index db0b7684..18569bea 100644 --- a/pactest/tests/deptest001.py +++ b/pactest/tests/deptest001.py @@ -1,20 +1,16 @@ self.description = "test deptest (-T) functionality" -sp1 = pmpkg("pkg1") -sp1.depends = ["dep"] -self.addpkg2db("sync", sp1) +lp1 = pmpkg("pkg1") +self.addpkg2db("local", lp1) -sp1dep = pmpkg("dep") -self.addpkg2db("sync", sp1dep) +lp3 = pmpkg("pkg3", "2.0-1") +lp3.provides = ("prov=3.0") +self.addpkg2db("local", lp3) -sp2 = pmpkg("pkg2") -self.addpkg2db("sync", sp2) - -lp2 = pmpkg("pkg2") -self.addpkg2db("local", lp2) - -self.args = "-T pkg1 pkg2" +self.args = "-T pkg1 pkg2 pkg3\>2.1 prov\>\=3.0" self.addrule("PACMAN_RETCODE=127") -self.addrule("PACMAN_OUTPUT=pkg1") -self.addrule("!PACMAN_OUTPUT=pkg2") +self.addrule("!PACMAN_OUTPUT=pkg1") +self.addrule("PACMAN_OUTPUT=pkg2") +self.addrule("PACMAN_OUTPUT=pkg3") +self.addrule("!PACMAN_OUTPUT=prov") -- cgit v1.2.3-70-g09d2