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

Re: Debconf problem



Frank Küster wrote:
> Sorry for still being dumb.  When it's reconfigure, I have just learned
> that the config script is run only once, so I need not handle this case
> specially.  But when its an upgrade, it is run twice, and I need to
> discriminate between the first pass (check existing permission, db_set,
> question will be asked depending on frontend and priority) and the
> second pass (no need to check existing permissions, no db_set, question
> will not be asked).  As I read debconf-devel(7), the arguments are the
> same in both invocations.  
> 
> Does that mean I must use some hackish handmade flags that are reset
> only at the end of the postinst, and thus indicate whether there was a
> postinst run after the last config run?

No, it means that you're taking the wrong approach to using debconf.
I've been trying to point you at tools that will lead to an appropriate
solution.

Your package is being converted from a previous version, which did not
use debconf and did have the files, to a version which does use debconf.
So why ask the question on upgrade from this previous version at all?
The parameters passed to the config script can be used to detect the
upgrade and not ask any questions or populate the debconf database at
all, while leaving debconf asking the question on fresh installs and
when reconfigured.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: