Red Hat Bugzilla – Bug 834278
Anaconda aborts upgrades too early when scriptlet errors occur
Last modified: 2012-11-21 17:49:49 EST
Description of problem:
During a preupgrade based upgrade from F16 to F17 the installer failed part way through with the following message:
A script error occured when installing the emacs package. This could indicate
errors when reading the installation media. Installation cannot continue.
Sure enough in upgrade.log:
error: %preun(emacs-1:23.3-9.fc16.i686) scriptlet failed, exit status 2
Version-Release number of selected component (if applicable):
Looks repeatable but due to the disruption of an upgrade reproduction is time
Steps to Reproduce:
1. Install minimal f16 image.
2. Create an alternative version of one of the packages with a bogus preun
script. Make sure you select a package that has a new version in f17.
3. preupgrade to f17 (probably also affects DVD upgrades when the package
with the bogus preun script is a core package).
On observing the script error the installer halts entirely part way through
a transaction. No other scripts are run. In particular this means that kernel posttrans scripts (which configures the initrd) do not get run resulting in a unbootable system.
Like yum the script errors should be non-fatal. Especially during upgrade it
is far more damaging to avoid running the other packages scriptlets than it
would be to continue.
Possibly a warning at the end of the upgrade might be justified but I don't think more than that it required. Obviously the emacs package should not have a preun script that can fail. Nevertheless anaconda's overreaction to what should be a non-fatal error has substantial collateral damage.
Reassigning to fedup so Will is aware, though I think he will either end up reassigning this again or closing it out.
We can't really change F17, since it's been released and is thus frozen. But this should already be fixed in F18, because we're using fedup for upgrades.
fedup downloads and verifies packages *before* the upgrade begins, so there shouldn't be any of those failures *during* the upgrade.
If there is a non-fatal scriptlet error, the upgrader will just log the error and continue with the upgrade.
(*Fatal* scriptlet errors are still fatal, but that's between RPM and the offending package.)
So. I think this has to be closed as NEXTRELEASE: we can't fix upgrades to F17, but it should work for F18.
If do reproduce the problem in an upgrade to F18, please file a new bug.