On Sun, Jan 20, 2008 at 03:10:38PM +0100, Michael Biebl wrote: > Roger Leigh wrote: >> Hi folks, >> >> I noticed earlier today that many packages are creating copies of >> conffiles in their maintainer scripts with the extension ".dpkg-bak", >> which is not an extension used or removed by dpkg: > > Say you name the file /etc/foo.dpkg-old instead of /etc/foo.dpkg-bak. > dpkg won't remove this file on purge either, as it doesn't have any > reference anymore on /etc/foo.
OK. > So there is basically no difference here between using *.dpkg-bak or > *.dpkg-old. To really cleanup up the backup file, you'd have to do that in > postrm/purge. I agree, the wiki should be updated in that regard. Ack. > The advantage imho of using *.dpkg-bak is, that you can differentiate which > files were created by dpkg and which one by the maintainer scripts. True. I have no objection to .dpkg-bak in principle--it would just be nice if it was made "official". Currently some scripts are infringing on the .dpkg-(old|new|dist|tmp)$ namespace, where .dpkg-bak might be more appropriate, but it would be nice to have some clear guidelines on which names are appropriate for maintainer scripts to use. > Maybe it would be a good idea to write a debhelper script (say > dh_obsolete), which would create the necessary maintainer scripts. > This would avoid to copy the scripts from > http://wiki.debian.org/DpkgConffileHandling over and over again. This would be very useful. It could also robustly add all the necessary bits to preinst/postrm, so long as you just told it which version you removed it. Currently it's all too easy to make a mistake, particularly if you want to handle aborted installs and downgrades. > Regarding run-parts: There is no problem afaik. I quickly tried this: > > # mkdir test > # touch test/foo > # touch test/foo.dpkg-old > # touch test/foo.dpkg-bak > # run-parts --list test > test/foo This does appear to be the case (I also tested it). But, it doesn't match the documentation, nor the source! run-parts.c: regcomp(&excsre, "^[a-z0-9-].*dpkg-(old|dist|new|tmp)$", Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]