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

[very preliminary] C debconf conceptual code



Here's a bit of code that doesn't do anything useful yet, but illustrate
some ideas about how a C-implementation of debconf may be built:

        http://auric.debian.org/~tausq/cdebconf-0.10.tgz

The basic idea is to have a pluggable architecture where frontend and
database modules can be written and plugged in via a configuration file.
i'd like to think the overhead for this flexibility is fairly minimal
(some dlopen code, and maybe the configuration stuff, which adds up to
about 7-8k); if people think that's too much we can use a static
architecture for the boot-floppies debconf.

Right now, the confmodule starts up by reading a config file, that might
look like this:

frontend {
  default {
    driver "ncurses"; // use the ncurses frontend by default
  };

  driver "ncurses" {
    module "modules/frontend/ncurses.so";
  };

  driver "text" {
    module "modules/frontend/text.so";
  };
};

database {
  default {
    driver "textdb"; // use the textdb database backend by default
  };

  driver "textdb" {
    module "modules/db/textdb.so";
  };
};

The database and frontend modules are then instantiated, loading in the
approrpriate DSOs from the config file. Finally, a confmodule is
initialized which will call fork/exec to run the config script, and talk to
it using stdin/stdout.

if anything looks odd, it's because i wrote most of it on a plane :-)
seriously though, comments/suggestions are most welcome. volunteers to
work on this will be very much appreciated too!

randolph
-- 
Debian Developer <tausq@debian.org>
http://www.TauSq.org/



Reply to: