mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
Add a few new provides tests
These deal with already-installed packages and how they should be the preferred provider in cases where provider selection now occurs. A few involve multiple sync repos. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
a99e7272b8
commit
6e71922e6c
22
test/pacman/tests/provision002.py
Normal file
22
test/pacman/tests/provision002.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
self.description = "-S provision, multiple providers, one installed"
|
||||||
|
|
||||||
|
sp = pmpkg("pkg1", "1.0-2")
|
||||||
|
sp.provides = ["pkg-env"]
|
||||||
|
self.addpkg2db("sync", sp)
|
||||||
|
|
||||||
|
sp = pmpkg("pkg2", "1.0-2")
|
||||||
|
sp.provides = ["pkg-env"]
|
||||||
|
self.addpkg2db("sync", sp)
|
||||||
|
|
||||||
|
lp = pmpkg("pkg2")
|
||||||
|
lp.provides = ["pkg-env"]
|
||||||
|
self.addpkg2db("local", lp)
|
||||||
|
|
||||||
|
self.args = "-S pkg-env"
|
||||||
|
|
||||||
|
self.addrule("PACMAN_RETCODE=0")
|
||||||
|
self.addrule("!PKG_EXIST=pkg1")
|
||||||
|
self.addrule("PKG_EXIST=pkg2")
|
||||||
|
self.addrule("PKG_VERSION=pkg2|1.0-2")
|
||||||
|
|
||||||
|
self.expectfailure = True
|
23
test/pacman/tests/provision003.py
Normal file
23
test/pacman/tests/provision003.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
self.description = "-S provision, multiple providers, one installed, different repos"
|
||||||
|
|
||||||
|
sp = pmpkg("pkg1", "1.0-2")
|
||||||
|
sp.provides = ["pkg-env"]
|
||||||
|
self.addpkg2db("sync", sp)
|
||||||
|
|
||||||
|
sp = pmpkg("pkg2", "1.0-2")
|
||||||
|
sp.provides = ["pkg-env"]
|
||||||
|
# this repo will be sorted second alphabetically
|
||||||
|
self.addpkg2db("sync2", sp)
|
||||||
|
|
||||||
|
lp = pmpkg("pkg2")
|
||||||
|
lp.provides = ["pkg-env"]
|
||||||
|
self.addpkg2db("local", lp)
|
||||||
|
|
||||||
|
self.args = "-S pkg-env"
|
||||||
|
|
||||||
|
self.addrule("PACMAN_RETCODE=0")
|
||||||
|
self.addrule("!PKG_EXIST=pkg1")
|
||||||
|
self.addrule("PKG_EXIST=pkg2")
|
||||||
|
self.addrule("PKG_VERSION=pkg2|1.0-2")
|
||||||
|
|
||||||
|
self.expectfailure = True
|
21
test/pacman/tests/provision004.py
Normal file
21
test/pacman/tests/provision004.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
self.description = "-S literal with provision of same name installed"
|
||||||
|
|
||||||
|
sp = pmpkg("provision", "1.0-2")
|
||||||
|
sp.provides = ["literal"]
|
||||||
|
sp.conflicts = ["literal"]
|
||||||
|
self.addpkg2db("sync", sp)
|
||||||
|
|
||||||
|
sp = pmpkg("literal", "1.0-2")
|
||||||
|
self.addpkg2db("sync2", sp)
|
||||||
|
|
||||||
|
lp = pmpkg("provision")
|
||||||
|
lp.provides = ["literal"]
|
||||||
|
lp.conflicts = ["literal"]
|
||||||
|
self.addpkg2db("local", lp)
|
||||||
|
|
||||||
|
self.args = "-S literal --ask=4"
|
||||||
|
|
||||||
|
self.addrule("PACMAN_RETCODE=0")
|
||||||
|
self.addrule("!PKG_EXIST=provision")
|
||||||
|
self.addrule("PKG_EXIST=literal")
|
||||||
|
self.addrule("PKG_VERSION=literal|1.0-2")
|
Loading…
Reference in New Issue
Block a user