On Fri, 14 Nov 2003 10:46:35 +1100, Matthew Palmer <[EMAIL PROTECTED]> said:
> What's to heavily modify? I presume the config file is a fairly > reasonable format, in which case a search 'n replace for > 'config_option\s=.*$' to 'config_option = <new value>' would > appropriately modify the file to suit your needs. > Unfortunately, if the user decides to modify the conffile at some > later point, your upgrades will tend to blow away those changes if > the user hasn't used debconf to make the change. To cover that > circumstance, I've started to make a file containing an md5sum of > the config file, and before I change it I make sure the user hasn't. > If they've changed it at all (so the md5sum has changed), I don't > make any modifications and it's then the user's problem to keep it > up to date. It's by no means perfect, but it follows Policy's "must > keep local config changes", and doesn't require pre- and > post-knowledge of what the options were in Debconf. This is suboptimal. If there are changes that would be made to a file if the user has not modified the file, then the user should be offered the choice to accept these changes even if they have modified the configuration file on their own. The "my way or the high way" approach is a dissservice to our users. Check out ucf; it has been specifically written to allow you to offer the user a choice, exactly like dpkg does for conffiles. manoj -- Kids have *_____never* taken guidance from their parents. If you could travel back in time and observe the original primate family in the original tree, you would see the primate parents yelling at the primate teenager for sitting around and sulking all day instead of hunting for grubs and berries like dad primate. Then you'd see the primate teenager stomp up to his branch and slam the leaves. Dave Barry, "Kids Today: They Don't Know Dum Diddly Do" Manoj Srivastava <[EMAIL PROTECTED]> <http://www.debian.org/%7Esrivasta/> 1024R/C7261095 print CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E 1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C