mirror of
https://github.com/moparisthebest/pacman
synced 2024-10-31 23:55:04 -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>
19 lines
510 B
Python
19 lines
510 B
Python
self.description = "Upgrade a package, with a backup file in the NEW package only"
|
|
|
|
lp = pmpkg("dummy")
|
|
lp.files = ["etc/dummy.conf*"]
|
|
self.addpkg2db("local", lp)
|
|
|
|
p = pmpkg("dummy", "1.1-1")
|
|
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.1-1")
|
|
self.addrule("!FILE_MODIFIED=etc/dummy.conf")
|
|
# Do we want this pacnew or not?
|
|
self.addrule("FILE_PACNEW=etc/dummy.conf")
|
|
self.addrule("!FILE_PACSAVE=etc/dummy.conf")
|