[pacman-dev] When Backup has no effect...
Nagy Gabor
ngaba at bibl.u-szeged.hu
Thu Jan 24 05:42:50 EST 2008
> ---upgrade044.py---
> self.description = "Backup file relocation (package split)"
>
> lp = pmpkg("foo")
> lp.files = ["etc/foo.cfg*"]
> lp.backup = ["etc/foo.cfg"]
> self.addpkg2db("local", lp)
>
> p1 = pmpkg("foo", "1.0-2")
> self.addpkg(p1)
>
> p2 = pmpkg("libfoo", "1.0-2")
> p2.files = ["etc/foo.cfg**"]
> p2.backup = ["etc/foo.cfg"]
> self.addpkg(p2)
>
> self.filesystem = ["etc/foo.cfg"]
>
> self.args = "-U %s" % " ".join([p.filename() for p in p1, p2])
>
> self.addrule("PKG_VERSION=foo|1.0-2")
> self.addrule("PKG_VERSION=libfoo|1.0-2")
> self.addrule("!FILE_PACSAVE=etc/foo.cfg")
> self.addrule("FILE_PACNEW=etc/foo.cfg")
> self.addrule("FILE_EXIST=etc/foo.cfg")
> ----------
A bit more problematic issue:
If you remove the p2.backup line, etc/foo.cfg will be simply overwritten!
So if a file changes owner and leaves backup, the old backup field has no
effect. This is still an edge case, but this shouldn't happen.
Bye
----------------------------------------------------
SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/
More information about the pacman-dev
mailing list