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>
Wed, 13 Feb 2013 16:52:28 +0000 (16:52 +0000)
commit6d1594103318770873294a49443fd69752df2977
tree134447c7f3b4aed49b9b73bfaa43f267bdacc037
parent4d559dc6dc58babd716d937e20ab4e174480a163
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.

(From OE-Core rev: ed8ac4ee43132ae974794038821f7ca5465ae556)

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