mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-01 08:05:05 -04:00
843d368ef6
As seen with the recent upgrade of pacman and the removal of the pacman.d/current mirrorlist, files that were formerly in the backup array get deleted upon their removal, which could be dangerous. Instead, we should use the combined backup array of the old and new package. This fix should address this issue in a relatively straightforward way. In addition, old files should be moved to pacsave locations as expected. Signed-off-by: Dan McGee <dan@archlinux.org>
18 lines
483 B
Python
18 lines
483 B
Python
self.description = "Upgrade a package, with a file leaving 'backup' but staying in the pkg"
|
|
|
|
lp = pmpkg("dummy")
|
|
lp.files = ["etc/dummy.conf*"]
|
|
lp.backup = ["etc/dummy.conf"]
|
|
self.addpkg2db("local", lp)
|
|
|
|
p = pmpkg("dummy", "1.0-2")
|
|
p.files = ["etc/dummy.conf"]
|
|
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_PACNEW=etc/dummy.conf")
|
|
self.addrule("FILE_EXIST=etc/dummy.conf")
|