]> code.ossystems Code Review - openembedded-core.git/commit
package_rpm: Fix useradd preinst ordering issues
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 Apr 2012 21:31:20 +0000 (22:31 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 Apr 2012 23:24:12 +0000 (00:24 +0100)
commit2c136255a7db8c57ab595a9c2ee1f32aebefc480
tree96cca0fa30ecb871b839a9429327f1e00f3b24f1
parent19e3c031ccbcce655e4a60c4a488e27b09259fba
package_rpm: Fix useradd preinst ordering issues

We were already having occasional ordering issues with package_rpm.
Fixing the ldconfig postinstall issue pushed rpm over the cliff and
totally broke rpm builds with the packages getting installed in
effectively a random order and the useradd preinstalls getting executed
out of order and breaking.

The only explanation I can find for this is that rpm is special. It will
happily run a preinst for a package without any of that package's
dependencies being present regardless of whether there are any circular
dependency issues or not. I attempted various ways of solving this such
as ordering the total_solution.manifest in creative ways but the bottom
line is RPM ignores this. It takes little account of any request to
ignore /bin/sh dependencies for the purposes of constructing the final
image.

The end result is we're having to install the base-passwd, base-files
and shadow packages first (if there is a request to install them), then
install any other packages.

It this wasn't in the middle of a release I'd be rewriting this bbclass
file, its horrible.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_rpm.bbclass