Mailinglist Archive: opensuse-factory (914 mails)

< Previous Next >
Re: [opensuse-factory] TW 20170626: /var/lock gone?
On Fri, 2017-06-30 at 16:38 +0200, Thorsten Kukuk wrote:
On Fri, Jun 30, Dominique Leuenberger / DimStar wrote:

I wonder if we should not rather do %post than %posttrans when we
change it. In context of zypper, the difference is 'small' (in any
case, each package is installed as a transaction of its own) - but
will install the packages and skip/collect transaction scripts in
to execute them in the end.

Depends on from where you are coming. If /var/lock is still a
%post will not work. The directory is only removed afterwards I was


ah right... taking into account the ordering, this is true:

1. %pretrans of new package
2. %pre of new package
3. package install
4. %post of new package
5. %triggerin of other packages (set off by installing new package)
6. %triggerin of new package (if any are true)
7. %triggerun of old package (if it's set off by uninstalling the old
8. %triggerun of other packages (set off by uninstalling old package)
9. %preun of old package
10. (removal of old package)
11. %postun of old package
12. %triggerpostun of old package (if it's set off by uninstalling the
old package)
13. %triggerpostun of other packages (if they're setu off by
uninstalling the old package)
14. %posttrans of new package

so %post in the new package is definitively too early, as the old
package is not yet uninstalled - and /var/lock thus still present

That means posttrans would be an option (with the issue I already
stated - other packages upgrading in the same transaction might not
have /var/lock available, or possibly a triggerpostun -- filesystem
might work as well (I recall having seen such a hack already somewhere)

< Previous Next >