Bug#311188: debconf as a registry
On 10/17/2014 04:34 AM, Bas Wijnen wrote:
> So debconf needs to read configuration files, but it doesn't know how to
> parse them. So it does the only thing it can: it uses its cache. Which
> means that each and every package that uses debconf must make sure that
> they read the configuration files and update debconf's cache _before_
> running debconf. And most of them don't do that.
Could you name a few package for which this is the case? Has bugs been
opened for them?
> The above problems are solved by my plan to create a "static script
> library", which is included in config scripts at package build time.
> This library would define functions for parsing common config file
> formats, and can be included in config scripts with a line similar to
> ##DEBHELPER##. This has the benefit of solving the problem, without
> causing the problem of adding lots of duplicate code to the soures.
Then such a library *must* be marked as essential, and installed by
default, otherwise it would break the install workflow.
> Oh yes, and I have some code ready for feedback. I haven't written the
> script libraries yet (and I want others to write some of them), but I
> have written the debhelper module for using them. I have set up a
> mini-dinstall repository where you can get the binary and source
> packages:
> deb [arch=all,amd64] http://wijnen.dtdns.net/archive unstable main
> deb-src http://wijnen.dtdns.net/archive unstable main
> (Please ignore problems with the keys; I'm still getting it to work
> right.)
>
> The code is derived from dh-autoreconf and it is the first ever perl
> program I wrote. So please don't insult me, but also don't hold back
> when you see things that need to be improved. :-)
>
> Thanks,
> Bas
Ok, you have a repository. But which package should we look into?
As for parsing files, I don't think using perl is a great idea. Such
configuration files sometimes may be huge. But anyway. I have a list of
features that such a library would need to do for .ini files. This would
include not only reading and writing to .ini files, but also allow
maintenance of them, like for example moving a directive from one
section to another (when this happens upstream).
Cheers,
Thomas Goirand (zigo)
Reply to: