summaryrefslogtreecommitdiff
path: root/test/pacman/tests/scriptlet002.py
blob: 907f419982f1801d61db321526fae443006dfbfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
self.description = "Scriptlet test (pre/post remove)"

p1 = pmpkg("dummy")
p1.files = ['etc/dummy.conf']
p1.install['pre_remove'] = "echo foobar > pre_remove"
p1.install['post_remove'] = "echo foobar > post_remove"
self.addpkg2db("local", p1)

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

self.addrule("PACMAN_RETCODE=0")
self.addrule("FILE_EXIST=pre_remove")
self.addrule("FILE_EXIST=post_remove")

fakechroot = util.which("fakechroot")
if not fakechroot:
        self.expectfailure = True