mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-16 14:25:21 -05:00
b2914bf0af
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>
17 lines
418 B
Python
17 lines
418 B
Python
self.description = "test deptest (-T) functionality"
|
|
|
|
lp1 = pmpkg("pkg1")
|
|
self.addpkg2db("local", lp1)
|
|
|
|
lp3 = pmpkg("pkg3", "2.0-1")
|
|
lp3.provides = ("prov=3.0")
|
|
self.addpkg2db("local", lp3)
|
|
|
|
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=pkg3")
|
|
self.addrule("!PACMAN_OUTPUT=prov")
|