summaryrefslogtreecommitdiffstats
path: root/pactest/tests/upgrade024.py
blob: ec2f762319cedb697c8da9d0b37b0dd3a0ec7c8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
self.description = "Upgrade a package, with a file leaving 'backup'"

lp = pmpkg("dummy")
lp.files = ["etc/dummy.conf*"]
lp.backup = ["etc/dummy.conf"]
self.addpkg2db("local", lp)

p = pmpkg("dummy", "1.0-2")
self.addpkg(p)

self.args = "-U %s" % p.filename()

self.addrule("PKG_VERSION=dummy|1.0-2")
self.addrule("FILE_PACSAVE=etc/dummy.conf")
self.addrule("!FILE_EXIST=etc/dummy.conf")