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

Re: variable list in database



Wichert Akkerman <wichert@cs.leidenuniv.nl> writes:

> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: quoted-printable
> 
> 
> Exams are over, so I started playing around with the database. I noted
> my current proposal (and all other suggestions) have a bit of a problem.
> 
> We agreed that we need to have something like a debian/control entry for
> each variable that is stored in the database. An example:
> 
>     Variable: hostname
>     Default: debian
>     Type: hostname
>     Description: hostname of this computer
>      This is the fully qualified hostname of your computer.
> 
> Each package should list all the variables it uses in a file
> debian/vars.
> 
> Now the problem: we don't know in advance which variables we need. An
> example: take a server with 3 virtual domains. Each domain needs its own

But I have only one, and i don't wont to get asked 3 times. Other
people have 2, 4, 5, 999999999 virtual domains. You have to ask for
the number first or have it loop until no more are entered. Just
having variables doesn't cut it, you need some kind of abstract
description of the effect of one answere (e.g.: How many?) on other
questions. Also you need some mechanism to question a set of questions 
as long as there are more anseres, as needed in the example above. (I
prefer typeing in all virtual domains and then finish with an empty
name instead of counting them beforehand).

> configuration. I propose we add a new level of indirection: we create a
> list of variable-templates, with the same syntax as shown above, and a
> seperate list that maps variables to templates. Then we add a command
> somewhere to create a new variable in the database using a predefined
> template. That means we can do things like:
> 
>     Template: alias-file
>     Default: /etc/aliases
>     Type: string
>     Description: location of aliases-file for your maildomain
>       The location where the aliases-file for a maildomain is stored.
>       For single-domain systems this will usually be /etc/aliases. For
>       multi-domain system you can define this for each domain
>       seperately.
> 
> And then register the actual variable as follows:
> 
>     mail-transfer-agent/alias-file    alias-file
> 
> This will create a variable mail-transfer-agent/alias-file using the
> template alias-file, which will be used by all maildomains unless we
> override it. Now we add a new variable for a specific domain:
> 
>     dpkg-db createvar mail-transfer-agent/my.new.domain/alias-file alias-file

May the Source be with you.
			Goswin


Reply to: