1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-17 06:45:05 -05:00

Remove requiredby from pactests

Also remove some meaningless pactests (broken requiredby, requiredby*.py
tests). requiredby001.py was renamed to upgrade076.py.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Nagy Gabor 2008-07-05 10:48:26 +02:00 committed by Dan McGee
parent 72c0ab5c51
commit 30702350fa
35 changed files with 2 additions and 183 deletions

View File

@ -6,13 +6,10 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2") lp2 = pmpkg("pkg2")
lp2.provides = ["imaginary"] lp2.provides = ["imaginary"]
lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2) self.addpkg2db("local", lp2)
self.args = "-R %s" % lp1.name self.args = "-R %s" % lp1.name
self.addrule("PACMAN_RETCODE=0") self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=pkg1") self.addrule("!PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2") self.addrule("PKG_EXIST=pkg2")
self.addrule("!PKG_REQUIREDBY=pkg2|pkg1")

View File

@ -2,12 +2,10 @@ self.description = "Remove a no longer needed package (multiple provision)"
lp1 = pmpkg("pkg1") lp1 = pmpkg("pkg1")
lp1.provides = ["imaginary"] lp1.provides = ["imaginary"]
lp1.requiredby = ["pkg3"]
self.addpkg2db("local", lp1) self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2") lp2 = pmpkg("pkg2")
lp2.provides = ["imaginary"] lp2.provides = ["imaginary"]
lp2.requiredby = ["pkg3"]
self.addpkg2db("local", lp2) self.addpkg2db("local", lp2)
lp3 = pmpkg("pkg3") lp3 = pmpkg("pkg3")

View File

@ -6,10 +6,8 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2") lp2 = pmpkg("pkg2")
lp2.provides = ["imaginary"] lp2.provides = ["imaginary"]
lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2) self.addpkg2db("local", lp2)
self.args = "-Rc %s" % lp2.name self.args = "-Rc %s" % lp2.name
self.addrule("PACMAN_RETCODE=0") self.addrule("PACMAN_RETCODE=0")

View File

@ -6,13 +6,10 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2") lp2 = pmpkg("pkg2")
lp2.provides = ["imaginary"] lp2.provides = ["imaginary"]
lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2) self.addpkg2db("local", lp2)
self.args = "-R %s" % lp2.name self.args = "-R %s" % lp2.name
self.addrule("!PACMAN_RETCODE=0") self.addrule("!PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1") self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2") self.addrule("PKG_EXIST=pkg2")
self.addrule("PKG_REQUIREDBY=pkg2|pkg1")

View File

@ -7,18 +7,15 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2") lp2 = pmpkg("pkg2")
lp2.reason = 1 lp2.reason = 1
lp2.depends = ["pkg4"] lp2.depends = ["pkg4"]
lp2.requiredby = ["pkg1"]
self.addpkg2db("local", lp2) self.addpkg2db("local", lp2)
lp3 = pmpkg("pkg3") lp3 = pmpkg("pkg3")
lp3.reason = 1 lp3.reason = 1
lp3.requiredby = ["pkg1", "pkg4"]
self.addpkg2db("local", lp3) self.addpkg2db("local", lp3)
lp4 = pmpkg("pkg4") lp4 = pmpkg("pkg4")
lp4.reason = 1 lp4.reason = 1
lp4.depends = ["pkg3"] lp4.depends = ["pkg3"]
lp4.requiredby = ["pkg2"]
self.addpkg2db("local", lp4) self.addpkg2db("local", lp4)
self.args = "-Rs %s" % lp1.name self.args = "-Rs %s" % lp1.name

View File

@ -1,10 +0,0 @@
self.description = "Cascade remove a package with a broken required by"
lp1 = pmpkg("pkg1")
lp1.requiredby = [ "fake" ]
self.addpkg2db("local", lp1)
self.args = "-Rc %s" % lp1.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=pkg1")

View File

@ -1,7 +1,6 @@
self.description = "Remove a package required by other packages" self.description = "Remove a package required by other packages"
lp1 = pmpkg("pkg1") lp1 = pmpkg("pkg1")
lp1.requiredby = ["pkg2", "pkg3", "pkg4"]
self.addpkg2db("local", lp1) self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2") lp2 = pmpkg("pkg2")

View File

@ -1,10 +0,0 @@
self.description = "Remove a package with a broken required by"
lp1 = pmpkg("pkg1")
lp1.requiredby = [ "dep" ]
self.addpkg2db("local", lp1)
self.args = "-R %s" % lp1.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=pkg1")

View File

@ -1,7 +1,6 @@
self.description = "-Ru test" self.description = "-Ru test"
lp1 = pmpkg("pkg1") lp1 = pmpkg("pkg1")
lp1.requiredby = [ "pkg3" ]
self.addpkg2db("local", lp1) self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2") lp2 = pmpkg("pkg2")

View File

@ -1,16 +0,0 @@
self.description = "A package was removed with -Rd, then downgraded"
lp1 = pmpkg("pkg1")
lp1.depends = ["pkg2=1.1"]
self.addpkg2db("local", lp1)
p = pmpkg("pkg2", "1.0-1")
self.addpkg(p)
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_VERSION=pkg2|1.0-1")
self.addrule("PKG_EXIST=pkg2")
self.addrule("!PKG_REQUIREDBY=pkg2|pkg1")

View File

@ -1,16 +0,0 @@
self.description = "A package was removed with -Rd, then upgraded"
lp1 = pmpkg("pkg1")
lp1.depends = ["pkg2>=1.1"]
self.addpkg2db("local", lp1)
p = pmpkg("pkg2", "1.2-1")
self.addpkg(p)
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_VERSION=pkg2|1.2-1")
self.addrule("PKG_EXIST=pkg2")
self.addrule("PKG_REQUIREDBY=pkg2|pkg1")

View File

@ -1,20 +0,0 @@
self.description = "Upgrade a package that no longer needs a depend"
lp1 = pmpkg("pkg1")
lp1.depends = ["pkg2"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.requiredby = ["pkg1"]
self.addpkg2db("local", lp2)
p = pmpkg("pkg1", "1.1-1")
self.addpkg(p)
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_VERSION=pkg1|1.1-1")
self.addrule("PKG_EXIST=pkg2")
self.addrule("!PKG_REQUIREDBY=pkg2|pkg1")

View File

@ -1,21 +0,0 @@
self.description = "Remove lp1, requiredby should move from lp1 to lp2"
lp1 = pmpkg("foo")
lp1.requiredby = ["pkg3"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.provides = ["foo"]
self.addpkg2db("local", lp2)
lp3 = pmpkg("pkg3")
lp3.depends = ["foo"]
self.addpkg2db("local", lp3)
self.args = "-R %s" % lp1.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=foo")
self.addrule("PKG_EXIST=pkg2")
self.addrule("PKG_REQUIREDBY=pkg2|pkg3")

View File

@ -1,21 +0,0 @@
self.description = "Broken requiredby/depends list"
lp1 = pmpkg("pkg1")
lp1.depends = ["pkg2"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.requiredby = ["foo", "pkg1"]
self.addpkg2db("local", lp2)
p = pmpkg("pkg1", "1.1-1")
p.depends = ["pkg2"]
self.addpkg(p)
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_VERSION=pkg1|1.1-1")
self.addrule("PKG_EXIST=pkg2")
self.addrule("PKG_REQUIREDBY=pkg2|pkg1")

View File

@ -25,5 +25,3 @@ for p in sp1, sp2, sp3:
for f in p.files: for f in p.files:
self.addrule("FILE_EXIST=%s" % f) self.addrule("FILE_EXIST=%s" % f)
self.addrule("PKG_DEPENDS=dep1|dep2") self.addrule("PKG_DEPENDS=dep1|dep2")
self.addrule("PKG_REQUIREDBY=dep1|dummy")
self.addrule("PKG_REQUIREDBY=dep2|dep1")

View File

@ -1,15 +0,0 @@
self.description = "Replace a package with a broken required by"
lp1 = pmpkg("pkg1")
lp1.replaces = [ "pkg2" ]
self.addpkg2db("sync", lp1)
lp2 = pmpkg("pkg2")
lp2.requiredby = [ "fake" ]
self.addpkg2db("local", lp2)
self.args = "-Su"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("!PKG_EXIST=pkg2")

View File

@ -2,11 +2,9 @@
self.description = "stonecrest's problem" self.description = "stonecrest's problem"
sp = pmpkg("dummy", "1.1-1") sp = pmpkg("dummy", "1.1-1")
sp.requiredby = [ "pkg" ]
self.addpkg2db("sync", sp) self.addpkg2db("sync", sp)
lp1 = pmpkg("dummy", "1.0-1") lp1 = pmpkg("dummy", "1.0-1")
lp1.requiredby = [ "pkg" ]
self.addpkg2db("local", lp1) self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg") lp2 = pmpkg("pkg")

View File

@ -12,4 +12,3 @@ self.args = "-S %s" % sp1.name
self.addrule("PACMAN_RETCODE=1") self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1") self.addrule("!PKG_EXIST=pkg1")
self.addrule("!PKG_EXIST=pkg2") self.addrule("!PKG_EXIST=pkg2")
self.addrule("!PKG_REQUIREDBY=pkg2|pkg1")

View File

@ -13,7 +13,6 @@ lp1.depends = ["pkg2=1.0-1"]
self.addpkg2db("local", lp1) self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2", "1.0-1") lp2 = pmpkg("pkg2", "1.0-1")
lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2) self.addpkg2db("local", lp2)
self.args = "-S pkg1" self.args = "-S pkg1"

View File

@ -6,7 +6,6 @@ self.addpkg2db("sync", sp)
lp1 = pmpkg("pkg1") lp1 = pmpkg("pkg1")
lp1.provides = ["foo"] lp1.provides = ["foo"]
lp1.requiredby = ["pkg2"]
self.addpkg2db("local", lp1) self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2") lp2 = pmpkg("pkg2")
@ -19,4 +18,3 @@ self.addrule("PACMAN_RETCODE=1")
self.addrule("PKG_EXIST=pkg1") self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2") self.addrule("PKG_EXIST=pkg2")
self.addrule("!PKG_EXIST=pkg3") self.addrule("!PKG_EXIST=pkg3")
self.addrule("PKG_REQUIREDBY=pkg1|pkg2")

View File

@ -7,7 +7,6 @@ self.addpkg2db("sync", sp)
lp1 = pmpkg("pkg1") lp1 = pmpkg("pkg1")
lp1.provides = ["foo"] lp1.provides = ["foo"]
lp1.requiredby = ["pkg2"]
self.addpkg2db("local", lp1) self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2") lp2 = pmpkg("pkg2")
@ -20,4 +19,3 @@ self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=pkg1") self.addrule("!PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2") self.addrule("PKG_EXIST=pkg2")
self.addrule("PKG_EXIST=pkg3") self.addrule("PKG_EXIST=pkg3")
self.addrule("PKG_REQUIREDBY=pkg3|pkg2")

View File

@ -6,7 +6,6 @@ sp.conflicts = ["foo"]
self.addpkg2db("sync", sp) self.addpkg2db("sync", sp)
lp = pmpkg("foo") lp = pmpkg("foo")
lp.requiredby = ["lp1", "lp2"]
self.addpkg2db("local", lp) self.addpkg2db("local", lp)
lp1 = pmpkg("pkg1") lp1 = pmpkg("pkg1")
@ -23,6 +22,4 @@ self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=foo") self.addrule("!PKG_EXIST=foo")
self.addrule("PKG_EXIST=bar") self.addrule("PKG_EXIST=bar")
self.addrule("PKG_EXIST=pkg1") self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_REQUIREDBY=bar|pkg1")
self.addrule("PKG_EXIST=pkg2") self.addrule("PKG_EXIST=pkg2")
self.addrule("PKG_REQUIREDBY=bar|pkg2")

View File

@ -6,7 +6,6 @@ self.addpkg2db("sync", sp)
lp = pmpkg("bar") lp = pmpkg("bar")
lp.provides = ["foo"] lp.provides = ["foo"]
lp.conflicts = ["foo"] lp.conflicts = ["foo"]
lp.requiredby = ["lp1", "lp2"]
self.addpkg2db("local", lp) self.addpkg2db("local", lp)
lp1 = pmpkg("pkg1") lp1 = pmpkg("pkg1")
@ -23,6 +22,4 @@ self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=foo") self.addrule("PKG_EXIST=foo")
self.addrule("!PKG_EXIST=bar") self.addrule("!PKG_EXIST=bar")
self.addrule("PKG_EXIST=pkg1") self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_REQUIREDBY=foo|pkg1")
self.addrule("PKG_EXIST=pkg2") self.addrule("PKG_EXIST=pkg2")
self.addrule("PKG_REQUIREDBY=foo|pkg2")

View File

@ -6,7 +6,6 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2") lp2 = pmpkg("pkg2")
lp2.provides = ["imaginary", "real"] lp2.provides = ["imaginary", "real"]
lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2) self.addpkg2db("local", lp2)
p = pmpkg("pkg2", "1.0-2") p = pmpkg("pkg2", "1.0-2")

View File

@ -17,4 +17,3 @@ self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0") self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=pkg1|1.0-2") self.addrule("PKG_VERSION=pkg1|1.0-2")
self.addrule("PKG_EXIST=pkg2") self.addrule("PKG_EXIST=pkg2")
self.addrule("PKG_REQUIREDBY=pkg2|pkg1")

View File

@ -17,4 +17,3 @@ self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0") self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=pkg1|1.0-2") self.addrule("PKG_VERSION=pkg1|1.0-2")
self.addrule("PKG_EXIST=pkg2") self.addrule("PKG_EXIST=pkg2")
self.addrule("PKG_REQUIREDBY=pkg2|pkg1")

View File

@ -6,12 +6,10 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2") lp2 = pmpkg("pkg2")
lp2.provides = ["imaginary"] lp2.provides = ["imaginary"]
lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2) self.addpkg2db("local", lp2)
lp3 = pmpkg("pkg3") lp3 = pmpkg("pkg3")
lp3.provides = ["imaginary2"] lp3.provides = ["imaginary2"]
lp3.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp3) self.addpkg2db("local", lp3)
p = pmpkg("pkg2", "1.0-2") p = pmpkg("pkg2", "1.0-2")
@ -24,5 +22,4 @@ self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1") self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_VERSION=pkg2|1.0-2") self.addrule("PKG_VERSION=pkg2|1.0-2")
self.addrule("PKG_EXIST=pkg3") self.addrule("PKG_EXIST=pkg3")
self.addrule("PKG_REQUIREDBY=pkg2|pkg1")
self.addrule("PKG_DEPENDS=pkg1|imaginary") self.addrule("PKG_DEPENDS=pkg1|imaginary")

View File

@ -6,12 +6,10 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2") lp2 = pmpkg("pkg2")
lp2.provides = ["imaginary"] lp2.provides = ["imaginary"]
lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2) self.addpkg2db("local", lp2)
lp3 = pmpkg("pkg3") lp3 = pmpkg("pkg3")
lp3.provides = ["imaginary"] lp3.provides = ["imaginary"]
lp3.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp3) self.addpkg2db("local", lp3)
p = pmpkg("pkg2", "1.0-2") p = pmpkg("pkg2", "1.0-2")
@ -23,5 +21,3 @@ self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1") self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_VERSION=pkg2|1.0-2") self.addrule("PKG_VERSION=pkg2|1.0-2")
self.addrule("PKG_EXIST=pkg3") self.addrule("PKG_EXIST=pkg3")
self.addrule("!PKG_REQUIREDBY=pkg2|pkg1")
self.addrule("PKG_REQUIREDBY=pkg3|pkg1")

View File

@ -6,7 +6,6 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2") lp2 = pmpkg("pkg2")
lp2.provides = ["imag3"] lp2.provides = ["imag3"]
lp2.requiredby = ["pkg1"]
self.addpkg2db("local", lp2) self.addpkg2db("local", lp2)
p = pmpkg("pkg2", "1.0-2") p = pmpkg("pkg2", "1.0-2")
@ -18,6 +17,5 @@ self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0") self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1") self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_VERSION=pkg2|1.0-2") self.addrule("PKG_VERSION=pkg2|1.0-2")
self.addrule("PKG_REQUIREDBY=pkg2|pkg1")
self.addrule("PKG_DEPENDS=pkg1|pkg2") self.addrule("PKG_DEPENDS=pkg1|pkg2")
self.addrule("PKG_DEPENDS=pkg1|imag3") self.addrule("PKG_DEPENDS=pkg1|imag3")

View File

@ -5,7 +5,6 @@ lp1.depends = [ "pkg2=1.0" ]
self.addpkg2db("local", lp1) self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2", "1.0-1") lp2 = pmpkg("pkg2", "1.0-1")
lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2) self.addpkg2db("local", lp2)
p = pmpkg("pkg2", "1.1-1") p = pmpkg("pkg2", "1.1-1")

View File

@ -6,12 +6,10 @@ self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2", "1.0-1") lp2 = pmpkg("pkg2", "1.0-1")
lp2.provides = ["imaginary"] lp2.provides = ["imaginary"]
lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2) self.addpkg2db("local", lp2)
lp3 = pmpkg("pkg3", "1.0-1") lp3 = pmpkg("pkg3", "1.0-1")
lp3.provides = ["imaginary"] lp3.provides = ["imaginary"]
lp3.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp3) self.addpkg2db("local", lp3)
p2 = pmpkg("pkg2", "1.0-2") p2 = pmpkg("pkg2", "1.0-2")

View File

@ -5,7 +5,6 @@ lp1.depends = ["pkg2=1.0"]
self.addpkg2db("local", lp1) self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2", "1.0-1") lp2 = pmpkg("pkg2", "1.0-1")
lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2) self.addpkg2db("local", lp2)
p1 = pmpkg("pkg1", "1.1-1") p1 = pmpkg("pkg1", "1.1-1")

View File

@ -5,7 +5,6 @@ lp1.depends = ["imaginary"]
self.addpkg2db("local", lp1) self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2", "1.0-1") lp2 = pmpkg("pkg2", "1.0-1")
lp2.requiredby = [ "pkg1" ]
lp2.provides = ["imaginary"] lp2.provides = ["imaginary"]
self.addpkg2db("local", lp2) self.addpkg2db("local", lp2)

View File

@ -21,8 +21,6 @@ self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=dummy|1.0-2") self.addrule("PKG_VERSION=dummy|1.0-2")
self.addrule("PKG_DEPENDS=dummy|dep1") self.addrule("PKG_DEPENDS=dummy|dep1")
self.addrule("PKG_DEPENDS=dep1|dep2") self.addrule("PKG_DEPENDS=dep1|dep2")
self.addrule("PKG_REQUIREDBY=dep1|dummy")
self.addrule("PKG_REQUIREDBY=dep2|dep1")
for p in p1, p2, p3: for p in p1, p2, p3:
self.addrule("PKG_EXIST=%s" % p.name) self.addrule("PKG_EXIST=%s" % p.name)
for f in p.files: for f in p.files:

View File

@ -1,11 +1,10 @@
self.description = "A package is downgraded no longer satisfying a depend" self.description = "Package downgrade (failure)"
lp1 = pmpkg("pkg1") lp1 = pmpkg("pkg1")
lp1.depends = ["pkg2=1.1"] lp1.depends = ["pkg2=1.1"]
self.addpkg2db("local", lp1) self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2", "1.1-1") lp2 = pmpkg("pkg2", "1.1-1")
lp2.requiredby = ["pkg1"]
self.addpkg2db("local", lp2) self.addpkg2db("local", lp2)
p = pmpkg("pkg2", "1.0-1") p = pmpkg("pkg2", "1.0-1")
@ -15,6 +14,5 @@ self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=1") self.addrule("PACMAN_RETCODE=1")
self.addrule("PKG_EXIST=pkg1") self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_VERSION=pkg2|1.1-1")
self.addrule("PKG_EXIST=pkg2") self.addrule("PKG_EXIST=pkg2")
self.addrule("PKG_REQUIREDBY=pkg2|pkg1") self.addrule("PKG_VERSION=pkg2|1.1-1")