mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-12 04:15:06 -05:00
Add a slightly simpler versioned replace test
It turns out we have a few problems here which are best tackled independently. The first is simply parsing replacements as dep strings; the second will be dealing with replaces when the original package name still exists in the repository. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
96c4b1c303
commit
5a6ebec7b2
@ -1,4 +1,4 @@
|
|||||||
self.description = "Sysupgrade with a versioned replacement"
|
self.description = "Sysupgrade with a versioned replacement, original disappears"
|
||||||
|
|
||||||
sp1 = pmpkg("python2-yaml", "5-1")
|
sp1 = pmpkg("python2-yaml", "5-1")
|
||||||
sp1.replaces = ["python-yaml<5"]
|
sp1.replaces = ["python-yaml<5"]
|
||||||
@ -6,11 +6,6 @@ sp1.conflicts = ["python-yaml<5"]
|
|||||||
sp1.files = ["lib/python2/file"]
|
sp1.files = ["lib/python2/file"]
|
||||||
self.addpkg2db("sync", sp1)
|
self.addpkg2db("sync", sp1)
|
||||||
|
|
||||||
# the python3 version
|
|
||||||
sp2 = pmpkg("python-yaml", "5-1")
|
|
||||||
sp2.files = ["lib/python3/file"]
|
|
||||||
self.addpkg2db("sync", sp2)
|
|
||||||
|
|
||||||
lp1 = pmpkg("python-yaml", "4-1")
|
lp1 = pmpkg("python-yaml", "4-1")
|
||||||
lp1.files = ["lib/python2/file"]
|
lp1.files = ["lib/python2/file"]
|
||||||
self.addpkg2db("local", lp1)
|
self.addpkg2db("local", lp1)
|
||||||
|
@ -1,27 +1,25 @@
|
|||||||
self.description = "Replace a package with a file in 'backup' (local modified)"
|
self.description = "Sysupgrade with a versioned replacement, original stays"
|
||||||
# FS#24543
|
|
||||||
|
|
||||||
lp = pmpkg("dummy")
|
sp1 = pmpkg("python2-yaml", "5-1")
|
||||||
lp.files = ["etc/dummy.conf*", "bin/dummy"]
|
sp1.replaces = ["python-yaml<5"]
|
||||||
lp.backup = ["etc/dummy.conf"]
|
sp1.conflicts = ["python-yaml<5"]
|
||||||
self.addpkg2db("local", lp)
|
sp1.files = ["lib/python2/file"]
|
||||||
|
self.addpkg2db("sync", sp1)
|
||||||
|
|
||||||
sp = pmpkg("replacement")
|
# the python3 version
|
||||||
sp.replaces = ["dummy"]
|
sp2 = pmpkg("python-yaml", "5-1")
|
||||||
sp.files = ["etc/dummy.conf", "bin/dummy*"]
|
sp2.files = ["lib/python3/file"]
|
||||||
sp.backup = ["etc/dummy.conf"]
|
self.addpkg2db("sync", sp2)
|
||||||
self.addpkg2db("sync", sp)
|
|
||||||
|
lp1 = pmpkg("python-yaml", "4-1")
|
||||||
|
lp1.files = ["lib/python2/file"]
|
||||||
|
self.addpkg2db("local", lp1)
|
||||||
|
|
||||||
self.args = "-Su"
|
self.args = "-Su"
|
||||||
|
|
||||||
self.addrule("!PKG_EXIST=dummy")
|
self.addrule("PACMAN_RETCODE=0")
|
||||||
self.addrule("PKG_EXIST=replacement")
|
self.addrule("!PKG_EXIST=python-yaml")
|
||||||
|
self.addrule("PKG_VERSION=python2-yaml|5-1")
|
||||||
self.addrule("FILE_EXIST=etc/dummy.conf")
|
self.addrule("FILE_EXIST=lib/python2/file")
|
||||||
self.addrule("!FILE_MODIFIED=etc/dummy.conf")
|
|
||||||
self.addrule("!FILE_PACNEW=etc/dummy.conf")
|
|
||||||
self.addrule("!FILE_PACSAVE=etc/dummy.conf")
|
|
||||||
|
|
||||||
self.addrule("FILE_EXIST=bin/dummy")
|
|
||||||
|
|
||||||
self.expectfailure = True
|
self.expectfailure = True
|
||||||
|
27
test/pacman/tests/replace110.py
Normal file
27
test/pacman/tests/replace110.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
self.description = "Replace a package with a file in 'backup' (local modified)"
|
||||||
|
# FS#24543
|
||||||
|
|
||||||
|
lp = pmpkg("dummy")
|
||||||
|
lp.files = ["etc/dummy.conf*", "bin/dummy"]
|
||||||
|
lp.backup = ["etc/dummy.conf"]
|
||||||
|
self.addpkg2db("local", lp)
|
||||||
|
|
||||||
|
sp = pmpkg("replacement")
|
||||||
|
sp.replaces = ["dummy"]
|
||||||
|
sp.files = ["etc/dummy.conf", "bin/dummy*"]
|
||||||
|
sp.backup = ["etc/dummy.conf"]
|
||||||
|
self.addpkg2db("sync", sp)
|
||||||
|
|
||||||
|
self.args = "-Su"
|
||||||
|
|
||||||
|
self.addrule("!PKG_EXIST=dummy")
|
||||||
|
self.addrule("PKG_EXIST=replacement")
|
||||||
|
|
||||||
|
self.addrule("FILE_EXIST=etc/dummy.conf")
|
||||||
|
self.addrule("!FILE_MODIFIED=etc/dummy.conf")
|
||||||
|
self.addrule("!FILE_PACNEW=etc/dummy.conf")
|
||||||
|
self.addrule("!FILE_PACSAVE=etc/dummy.conf")
|
||||||
|
|
||||||
|
self.addrule("FILE_EXIST=bin/dummy")
|
||||||
|
|
||||||
|
self.expectfailure = True
|
Loading…
Reference in New Issue
Block a user