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

Re: Debconf preloading, standard method?



Scott Dier wrote:
> Has someone written a standard method of debconf preloading that is
> method independent?  I've seen one method for doing it for remote
> sources or sources that you actually 'download' in
> /var/cache/apt/archives/ and I've come up with an ugly way (need to make
> it less ugly, first) to handle file:/ method.

What I'm leaning toward doing is making a special dbdriver for debconf
that supports this type of thing. You would stack it underneath your
other debconf db's, and possibly enable it with an environment variable
that pointed to the defaults file. The defaults file would have a simple
format like:

question: foo
debconf/frontend: text
bar/baz: true

Or it might just be a standard copy of a debconf config.dat file, I
dunno.

Then when this was enabled and debconf asked for the default value of
one of those questions, that had not been asked before, it would return
the value from the file, which would also cause the question to be
marked as seen. When debconf saves the database it goes to the usual
config.dat file.. Then you don't really have to do any database
preloading, just set up the defaults file.

Does this seem sane? I haven't ever had to do this so I may not know all
the requirements. You can do part of this already by stacking a
preseeded config.dat underneath your regular one and making it
read-only, but that has the problem of where do you get that config.dat
from. A simpler file format might be better.

-- 
see shy jo



Reply to: