mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-16 06:15:08 -05: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>
19 lines
522 B
Python
19 lines
522 B
Python
self.description = "Upgrade a package, with a file in 'backup' (local modified, new unchanged)"
|
|
|
|
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"]
|
|
p.backup = ["etc/dummy.conf"]
|
|
self.addpkg(p)
|
|
|
|
self.args = "-U %s" % p.filename()
|
|
|
|
self.addrule("PKG_VERSION=dummy|1.0-2")
|
|
self.addrule("!FILE_MODIFIED=etc/dummy.conf")
|
|
self.addrule("!FILE_PACNEW=etc/dummy.conf")
|
|
self.addrule("!FILE_PACSAVE=etc/dummy.conf")
|