On Fri, 04 Jul 2008, Timothy G Abbott wrote: > On Tue, 1 Jul 2008, Raphael Hertzog wrote: > >> On Tue, 01 Jul 2008, Guillem Jover wrote: >>>> While I realize that using dpkg-divert on conffiles is an uncommon >>>> practice, the current behavior is clearly wrong. >>>> >>>> I've attached a simple git patch against current head that fixes this. >>> >>> Thanks for the patch! There's a problem with it though, namenodetouse >>> has as a side effect to activate a file trigger. I'll probably be moving >>> the side effect outside that function before applying this patch. >> >> We still have to activate the file trigger if we're effectively modifying >> the configuration file (i.e. in all cases except if the user decides to >> keep the old file IMO). >> >> So it could be argued that it's right to activate the trigger. After all, >> even if the user choose to keep the old configuration file, he might have >> merged some of the changes by hand (using the spawned shell). >> >> Do I miss something here? > > I think the point is that namenodetouse is already being called when > unpacking the archive, and thus triggers have already been activated on > the new filename.
But the content of the conffile gets real only after configuration and any trigger recorded during unpack might have already been processed (at the end of a dpkg --unpack run started by apt) while the content of the file didn't get replaced yet (we only have the .dpkg-new file for now). In fact, it might simply be wrong to record activation of a file-based trigger during unpack when we're speaking of a configuration file! Ccing Ian to get his input. Cheers, -- Raphaël Hertzog Le best-seller français mis à jour pour Debian Etch : http://www.ouaza.com/livre/admin-debian/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]