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

Discriminating between install after purge and install from state rc?



Hi,

it seems I am currently having a blackout.  How can I find out in
postinst whether the package previously had been in state "rc", or was
purged or never installed?  It seems every maintainer script that
handles a configuration file must check that - otherwise it would
violate policy's "must preserve local changes" in the following
scenario:

- package is installed
- configuration file is removed
- package is removed (but not purged)
- package is installed again: It must not recreate the file!

Therefore there should be at least one quite straightforward way to
achieve this.  But I can only think of doing dpkg queries in preinst and
storing this in /var/tmp - no, there must be something obvious I'm
missing.

TIA, Frank
-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer



Reply to: