On Mon, Apr 27, 1998 at 04:58:09AM -0500, Manoj Srivastava wrote: > Hi, > There is something missing here. Some packages create files in > postinst precicely because they do not want dpkg to handle these > files. Examples of this are score files and other data/configuration > files. > > If the maintainer intended to have dpkg be aware of these > files, they could have created zero length files in the forst place > (letting dpkg know) and then, if needed, manipulated them in the > postinst. [snip]
Sometimes the maintainer cannot provide a useful default conffile - it might contain network addresses for instance - so the files are generated in the postinst if missing and removed in the postrm. However this misses one detail, which I think is important; when dpkg removes a conffile, it also removes backups of it (filename~. filename.~1~ etc). Removing these backups could be done in the postrm, but if so then we need something in the policy saying which files to delete. For instance in the postrm, you might have: fn=file.conf rm -f $fn ${fn}~ ${fn}.~* #${fn}# /usr/doc/dpkg/packaging/ch-maintainerscripts.html 6.5 lists these: ~-files, #*# files, %-files, .dpkg-{old,new,tmp}, etc. However I'm not sure how these fit into the above example (%${fn} ?) Adrian email: [EMAIL PROTECTED], http://www.poboxes.com/adrian.bridgett Windows NT - Unix in beta-testing. PGP key available on public key servers -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]