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

Re: Common set of debconf templates

On Thu, Oct 14, 2004 at 02:30:32AM -0400, sean finney wrote:
> yes, it'd have to be rebuilt with the new templates every time they were
> updated, which is definitely a shortcoming.  

We did some sort of this in the ancient experimental dictionaries-common
policy, before it was even made semi-official, and dealing with extremely
different response times from package maintainers seemed to us a nightmare.
That was why Rafael Laboissiere designed the new system, that is working
pretty well for shared questions.

> > So things like the one below (in some sort of pseudo language, so untested)
> the problem with this setup is that if i understand it correctly, you're
> essentially sharing variables between all packages.  in many cases the
> variable will need to be stored per-package (database,username).

You are mixing two things, on the one side debconf shared questions and on
the other side independent questions having common or similar templates. The
setup I described is only for the former, a single question that is shared
by different packages (the typical shared/* questions)

> > AFAIK templates are all read and registered to debconf database before
> > the .config files are run. Pre-Dependencies stage (configuring packages on
> > which other pre-depend) takes place later. Why register would not work if
> > called from .config and the package containing the global question is also
> > being installed? I think a plain dependency is all what is needed to
> > make sure the global template is present and read at the .templates stage. 
> no, i believe they're registered *by* the config, or whatever script
> first sources the debconf library.  so, a template-providing package
> must already be pre-configured before debconf questions will work.

I might be wrong, but I do not think so, if things were this way, debconf
shared questions as described in the debconf manual would never work at the
.config stage, but be repeated each time with another new possibility as new
.config files registering new owners for that question are parsed. What I
vaguely remember is that only templates for packages having a .config file
(and might be that call debconf in it) are loaded, but that it is done before
the .config files are actually run.

Quoting from the debconf-devel man page (shared questions section)

  A  bit of an explanation is called for. By the time your config script
  runs, debconf has already read in all the templates for the packages that
  are being installed.

> > By the way, REGISTER looks a really nice approach for questions having
> > an essentially similar debconf template (not to be messed with shared/*
> > debconf templates). It might even be useful for shared/* questions instead
> > of the above schema.
> i really like the register idea as well.  

I now see that REGISTER might not be good for shared/* questions since it
would add another owner to the question, but it really deserves further
testing for independent questions having (nearly) common templates.

By the way, no need to cc me, I read debian-devel



Reply to: