]> code.ossystems Code Review - openembedded-core.git/commit
image.bbclass: add fall-back functionality when running intercepts
authorLaurentiu Palcu <laurentiu.palcu@intel.com>
Tue, 12 Feb 2013 16:12:37 +0000 (18:12 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 12 Feb 2013 16:35:13 +0000 (16:35 +0000)
commited8ac4ee43132ae974794038821f7ca5465ae556
treee58e338977557dcf898c502b031ff802546e90a5
parent0ef538d75c2f3921a2fcbe6ca1deed5525b276cc
image.bbclass: add fall-back functionality when running intercepts

If an intercept script fails, it would be helpful to fall-back to
running the postinstall on target's first boot. In order to achieve
that, the postinstalls that install a host intercept hook will have to
return 1, so that the postinstall is marked as unpacked only. If the
intercept hook fails, then we're ok, the postinstalls will be run on
target anyway. If it succeeds, then mark the packages as installed.

This logic was chosen mainly because of rpm backend which saves the
failed postinstalls in /etc/rpm-postinsts. Hence, in order to mark the
packages as installed, all we have to do is delete the scriptlets from
there.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/image.bbclass