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

Re: How to check debconf scripts



Andreas Tille wrote:
> in the debconf tutorial i've read that I can check the script by
> caling it before installing the whole package.  Obviousely I
> have to do this as root because of errors when calling as user.
> So I called it as root.  Some changes in the script where necessary
> and I did so (what else would you expect from a bloody beginner?).
> Unfortunately calling the changed script as root does nothing.
> 
> I suspect, that this has something to do with storing some data
> about the script in a database which means it was run once and
> doesn't has to be run now.  How can I enforce the script to run.
> 
> Didn't I read the tutorial right?

Right, debconf only asks questions once. It took your answers and is using
them for defaults now when you re-run the script. The simplest fix is to
delete /var/lib/debconf/debconf.db, but this will lose other answers you may
have given before. Instead, I reccommend that you modify your script to call
db_purge right after you source /usr/share/debconf/confmodule. This will
cause your old answers to be cleared when the script runs. Be _very_ sure
you take that command out before shipping the package, though.

I'll add something to the tutorial about this.

-- 
see shy jo


Reply to: