summaryrefslogtreecommitdiff
path: root/test/pacman/tests/remove070.py
blob: 898e2f50c7ca0b1ccd7285f1aba25525d4885cb7 (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
self.description = "Remove a package with various directory overlaps"

self.filesystem = ["lib/alsoonfs/randomfile"]

p1 = pmpkg("pkg1")
p1.files = ["bin/pkg1",
            "opt/",
            "lib/onlyinp1/",
            "lib/alsoonfs/"]

p2 = pmpkg("pkg2")
p2.files = ["bin/pkg2",
            "opt/",
            "lib/onlyinp2/"]

for p in p1, p2:
    self.addpkg2db("local", p)

self.args = "-R %s" % p1.name

self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")

self.addrule("DIR_EXIST=bin/")
self.addrule("DIR_EXIST=opt/")
self.addrule("!DIR_EXIST=lib/onlyinp1/")
self.addrule("DIR_EXIST=lib/onlyinp2/")
self.addrule("DIR_EXIST=lib/alsoonfs/")