[Rpm-maint] ignoring %preun faillure (like for %post & %postun)

Thierry Vignaud thierry.vignaud at gmail.com
Tue Aug 4 10:31:41 UTC 2015


Hi

Since commit a1377fcc7544acba04e67f40f5a2307ab04694ff &
71c6b06b3f240021f2ece46f9cf7aa891f716710, only %pre, %preun &
%pretrans can fail a transaction depending on their return value,
other scriptlet failures result in a warning

See http://rpm.org/gitweb?p=rpm.git;a=blob;f=lib/transaction.c#l1420

However I would like to reconsider %preun case.
Allowing it to fail is the same as when we previously allowed %post or
%postun to fail:

Eg when updating foo-1 to foo-2,
- if %post of foo-2 fails,
- or if %preun of foo-1 fails,
- or if %postun of foo-1 fails,
foo-1 was not removed, so we ended up with both packages in rpmdb

This was fixed for %post & %postun.
But allowing %preun to result in having 2 packages in rpmdb is bogus IMHO.

I think that rpm should ignore the error in the %preun cases too.

Obviously, there's 2 POV:
- failing uninstalling a package:
  should we allow %preun to abort it:
- updating a package:
  we should definitively not allow to end with both old & new packages in rpmdb

But unless we pass the info this is un update, I think the 2nd point
is more important than the first.
Having the same semantics for all %pre* scriptlets didn't take the
impact of duplicate packages in rpmdb in consideration. %pretrans &
%pre cannot result in this whereas %preun can...

WDYT?

See you


More information about the Rpm-maint mailing list