On 2024-12-22 at 08:37 +0100, Marc Haber wrote:
> Maybe our conffile handling should be modified to automatically
> accept comment-only changes to dpkg-conffiles.
> 
> Greetings
> Marc

That would require to tag what is considered a comment for each
conffile.

While most config files seem to use a # marker, other use ; (e.g.
php.ini), // or /* (firefox-esr) or even " (vimrc).

Some conffiles support multiple types of comments, while others none at
all. In some cases comments may be added at the end of lines, others
require that the comment starts the line, albeit whitespace is
*sometimes* allowed before.
In some cases conf files support a full shell syntax (you could comment
with if false; then ... fi), others only accept a tiny subset. In some
cases you can provide a multiline literal containing a comment-marker
(and there could be reasons for that, such as setting a banner with #
lines).

courier uses # comments, but lines beginning with ## are special, it
uses them so that their conffiles can be automatically upgraded (it is 
clever solution to the configuration-options-change-between-versions
problem, but again, specific to this package).


I do think it would be good that it was able to do some comment-merging 
(even if it is just telling you "the conffile changes are irrelevant"),
but it would require to at least define some classes of etc files on
which that would be supported (a compillation that would be useful for
other users as well, such as editors).


Regards


Reply via email to