summaryrefslogtreecommitdiff
path: root/test/pacman/tests/dependency-cycle-fixed-by-upgrade.py
blob: dc042e5fad2f33323baa98e7282d598259baef5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
self.description = "Circular dependency fixed by removed dependency"

lp1 = pmpkg("pkg1", "1-1")
lp1.depends = ["pkg2"]

lp2 = pmpkg("pkg2", "1-1")
lp2.depends = ["pkg3"]

lp3 = pmpkg("pkg3", "1-1")
lp3.depends = ["pkg1"]

for p in lp1, lp2, lp3:
        self.addpkg2db("local", p);

sp1 = pmpkg("pkg1", "1-2")
sp1.depends = ["pkg2"]

sp2 = pmpkg("pkg2", "1-2")

sp3 = pmpkg("pkg3", "1-2")
sp3.depends = ["pkg1"]

for p in sp1, sp2, sp3:
        self.addpkg2db("sync", p);

self.args = "-S %s %s %s" % (sp1.name, sp2.name, sp3.name)

self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=pkg1|1-2")
self.addrule("PKG_VERSION=pkg2|1-2")
self.addrule("PKG_VERSION=pkg3|1-2")
self.addrule("!PACMAN_OUTPUT=dependency cycle detected")