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

Re: Using dbconfig-common in maintainer scripts.



On Mon, 2010-04-12 at 09:36 +1000, Craig Small 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.

I considered this and changed my priority, still on the initial install
not all the questions are asked. They are asked on a dpkg-reconfigure
though.



> > the entries in /etc/dbconfig-common/postfix-cluebringer are all 
> > empty strings.
> Even the first one dbc_install ?

Even the dbc_install line is an empty string


> If dbc_install is anything but true then most if not all of the
> subsequent lines will be false.

Hmmm, is there a way to check for this and fix it in the maintainer
script?



> >         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.

Would be, if I could get the script to generate it :)



> 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.

I did enable "set -x" to see what I could find ... then I cam across
something saying that if anything output before debconf then debconf was
screwed.



> > 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

That is exactly the answer I was looking for ... so what is the easiest
way to determine if a package is installed and managed by
dbconfig-common? 




> > 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.

Thanks for the heads up there :)


-- 
Nikolai Lusan <nikolai@lusan.id.au>

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: