[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#30122: [PROPOSED] Fix bad advice about conffile management



Package: debian-policy
Version: 2.5.0.0

The policy manual still talks about providing scripts so that other
programs may modify dpkg 'conffiles'. This badly conflicts with both the
conffile mechanism and current accepted practice. I propose the
following changes to paragraphs 4-6 of section 4.7. 

==== Old version =========================================================

     If two or more packages use the same configuration file, one of these
     packages has to be defined as _owner_ of the configuration file, i.e.,
     it has to list the file as `conffile' and has to provide a program
     that modifies the configuration file.

     The other packages have to depend on the _owner_ package and use that
     program to update the configuration file.

     Sometimes it's appropriate to build a new package, which just provides
     the basic _infrastructure_ for the other packages and which manages
     the shared configuration files. (Check out the `sgml-base' package as
     an example.)

==== New Version =========================================================

     If two or more packages use the same configuration file, one of these
     packages has to be defined as _owner_ of the configuration file, i.e.,
     it has to list the file as `conffile'. The other packages have to
     depend on the owner package.

     If it is desirable for two or more related packages to share a
     configuration file _and_ for all of the related packages to be able
     to modify that configuration file, then the following should done:

         a) do _not_ distribute the configuration file with the any of
         the related packages. Instead, the postinst script of the core
         related packages should ensure that the file is created (e.g.
         by copying an base version from /usr/doc/<pkg>/example, or by
         an interactive script). Of course, the creation should only
         occur if there is no existing configuration file.
  
         b) do _not_ mark the configuration file as a dpkg 'conffile'.

         c) the core package should provide a program that the other
         packages may use to modify the configuration file.

         d) the related packages have to depend on the core package,
         and use the provided program to make any modifications to the
         configuration file

     Sometimes it's appropriate to build a new package, which just provides
     the basic _infrastructure_ for the other packages and which manages
     the shared configuration files. (Check out the `sgml-base' package as
     an example.)
==========================================================================

Steve Greenland


Reply to: