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

Re: [d-i]: cdebconf, persistency, rfc822db et al



* Joey Hess 

| Tollef Fog Heen wrote:
| > I am working on a rfc822/debconf compatible backend for cdebconf. 
| 
| Hm, I had meant to write a dbdriver for debconf that supported cdebconf
| style database files, never quite got around to it.

I began doing that, but figured that it was quicker just to write an
rfc822 based backend for cdebconf.

| > - add a method to debconf saying «reload your db, I have changed
| >   stuff underneat your feet».  This is ugly and suddenly the
| >   application using debconf needs to know about this stuff.
| > - add the ugly hack I mentioned, cluttering the distinction between
| >   set and save.
| > - add some sort of a semaphore file or something which means that the
| >   questions/templates will be reloaded.
| > - something entirely else.
| 
| FWIW, debconf flocks its database, and so one can't run
| debconf-loadtemplate while another debconf instance is running. But we
| need some way for d-i for cdebconf to load up newly available templates.
| All right -- what about adding a command to the debconf protocol that
| loads a templates file? This problem is probably unique to d-i so it
| might only be added to cdebconf. Something like:
| 
| X_LOADTEMLATEFILE /var/lib/dpkg/info/newpkg.templates

Maybe this is ok, so the running cdebconf should load the templates
instead of dpkg-loadtemplate?

| Another option would be to make cdebconf get restarted in this
| circumstance and load the templates while it is down.

the call tree here is something like

init -> /sbin/debian-installer -> debconf -> main-menu -> anna ->
udpkg -> debconf-loadtemplate

debconf-loadtemplate then needs to talk to debconf (can be done via
stdin/stdout communication, debconf protocol) and tell it to load
templates from a file.  Restarting debconf would be cumbersome, I
think.  debconf-loadtemplate will just have to be extended to see if
debconf is running by looking at DEBCONF_REDIR and using the
appropriate command if it is running.

Does this look sane?

-- 
Tollef Fog Heen                                                        ,''`.
UNIX is user friendly, it's just picky about who its friends are      : :' :
                                                                      `. `' 
                                                                        `-  


-- 
To UNSUBSCRIBE, email to debian-boot-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: