mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-17 14:55:07 -05:00
7480df68ce
This actually does something in a scriptlet we can check with our normal set of rules, rather than relying on pacman debug output. Signed-off-by: Dan McGee <dan@archlinux.org>
18 lines
470 B
Python
18 lines
470 B
Python
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
|