Hi Jonas,
Le 24/09/2022 à 00:22, Jonas Smedegaard a écrit :
Quoting Arnaud Ferraris (2022-09-23 14:51:40)
On Sat, 10 Sep 2022 10:18:39 -0700 Vagrant Cascadian
<vagr...@debian.org> wrote:
On 2022-06-04, Jonas Smedegaard wrote:
Seems more sensible for me, however, to implement this using debconf.
[ thoughts on non-debconf mechanism snipped ]
That seems a lot simpler than introducing the complexity of debconf
generated configuration files...
Indeed, so far my experiments with debconf for solving this matter have
been sub-optimal at best.
Can you elaborate on your bad experiences with debconf?
By using debconf (and unless I'm doing things wrong, which is definitely
possible), this requires having one question/template for each variable,
and potentially as many preseeds. I find this a bit cumbersome,
especially with the use of config fragments being a widespread practice,
making it easier for both packages and users to add/override config
parameters IMHO.
The case where 2 packages want to change the same variable is also more
difficult to handle, and it also prevents taking advantage of the shell
script-based config sourcing (where one could just expand an existing
variable instead of rewriting all of it). Finally, having a single
debconf-generated config file makes changes in the default configuration
tricky if both the third-party packages and the user make such changes.
Lastly, it makes me a bit uneasy as the Debian Policy[1] and Developer's
Reference[2] recommend that debconf be used only when necessary (at
least in my understanding).
Regards,
Arnaud
[1]
https://www.debian.org/doc/debian-policy/ch-binary.html#prompting-in-maintainer-scripts
[2]
https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#best-practices-for-maintainer-scripts
- Jonas