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

Re: How many times run debian/config?

Fabio Tranchitella <kobold@kobold.it> schrieb:

> Hi, I've some problems with debian/config script for my package.. I'm
> not sure about when the script run.
> If I install my package with dpkg, it run once, after unpacking... 
> But if I install the package with apt-get, it run twice: before the
> unpacking (Preconfiguring package) and after the unpacking (Configuring
> package), [...]
> Is it right or I'm missing something?

You have found it right. You also could have read it in
debconf-devel(7). You should also respect Policy 6.2:

| 6.2 Maintainer scripts Idempotency
| It is necessary for the error recovery procedures that the scripts be
| idempotent. This means that if it is run successfully, and then it is
| called again, it doesn't bomb out or cause any harm, but just ensures
| that everything is the way it ought to be. If the first call failed,
| or aborted half way through for some reason, the second call should
| merely do the things that were left undone the first time, if any, and
| exit with a success status if everything is OK.[33]

> so I have to check if conffiles have already been unpacked
> before trying to modify them. 

- The config script isn't really meant to modify anything. You should
  use it to figure out things, and the changes should be done in


Please! read Policy section 10.7, especiall 10.7.3.

Regards, Frank
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie

Reply to: