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

Re: Using dbconfig-common in maintainer scripts.



On Mon, Apr 12, 2010 at 08:31:01AM +1000, Nikolai Lusan wrote:
> What happens is that debconf asks the questions (not all the questions I
> would like),
Not asking all the questions sounds like a dpkg-configure priority
level.

> the entries in /etc/dbconfig-common/postfix-cluebringer are all 
> empty strings.
Even the first one dbc_install ?
If dbc_install is anything but true then most if not all of the
subsequent lines will be false.

>         dbc_generate_include="template:/etc/cluebringer/cluebringer.conf"
>         dbc_generate_include_perms="660"
>         dbc_generate_include_owner="root:www-data"
>         dbc_generate_include_args="-o template_infile=/usr/share/doc/postfix-cluebringer/templates/cluebringer.conf -U"
OK, so you're using the templates. I've only used the db_get strings but
that generally looks like a better way.

If I have problems with my postinst, I generally make a verbose postinst
script that blurts out everything it is doing etc. It's often found
what I'm missing.

> these packages don't rely on postfix-cluebringer I would like to be able
> to access the debconf/dbconfig-common database entries for
> postfix-cluebringer (if it is installed) to optionally configure them
> automagically for the user. Is this possible?
Did you try making a dummy package and using
db_get postfix-cluebringer/myvariable

> While debugging the postinst script I also noticed a whole lot of
> variables not mentioned in any documentation or example being used by
> dbconfig-common and I was wondering if any of these are usable in the
> config/postinst script (for forcing debconf to ask specific questions
If its not documented then you might, but then the maintainer might
change the name/function of that variable too.  I'd not depend on these.
They're shell scripts, so not exactly great at information hiding.

 - Craig

-- 
Craig Small      GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
http://www.enc.com.au/                             csmall at : enc.com.au
http://www.debian.org/          Debian GNU/Linux, software should be Free 


Reply to: