Joey Hess <[EMAIL PROTECTED]> wrote: > Frank Küster wrote: >> I found no way to cleanly solve the problem of >> >> - writing the current state into the debconf database, so that >> noninteractive installs don't change anything >> >> - actually reflect changed answers in the system. > > The config script is passed parameters that you can use to tell if it is > an upgrade or a reconfigure and handle these cases appropriatly.
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? Regards, Frank -- Frank Küster Inst. f. Biochemie der Univ. Zürich Debian Developer