Hi Guillem, Guillem Jover <[email protected]> writes: > I'd be curious to know about that workaround. One of the features of deb-systemd-helper is that it can reconstruct this state (first install or not) from the state file it keeps for other reasons (the fact that systemd might or might not be running all the time).
> If the policy is to enable all packages on installation, why not have > them enabled by default? I guess it needs to modify the filesystem > somehow? Yes, just as with sysvinit/update-rc.d, these files are enabled by creating symlinks. > On unpack the package will have a Config-Version field on the dpkg > database if it has been configured before, otherwise no such field > will be present. How would I query that Config-Version from postinst? Adam D. Barratt <[email protected]> writes: > Apologies if I'm missing something, but why not? From Policy 6.7: > > The `postinst' script may be called in the following ways: > > <postinst> `configure' <most-recently-configured-version> > [...] > If there is no most recently configured version `dpkg' will pass a > null argument. [1] Hm, indeed, that seems to do the trick. Not sure how I have missed that, thanks for the hint! :) Guillem, are Adam and I missing something here? Checking whether $2 is empty seems like an easy way. -- Best regards, Michael -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

