Bug 9261 - Can't distinguish between delayed and failed postinst
Summary: Can't distinguish between delayed and failed postinst
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: deployment (show other bugs)
Version: 2.1
Hardware: All Multiple
: Medium+ enhancement
Target Milestone: Future
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-03-15 13:36 UTC by Ross Burton
Modified: 2018-01-31 10:16 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2016-03-15 13:36:14 UTC
There's no way to tell if a postinst at rootfs time or is requesting to be delayed.

Example: typo in eudev meant that the rootfs-time postinst to run qemu and generate a host-specific file failed, but there's no way of telling this without reading the logs as on first boot the postinst will run again and generate the file.

I propose that we adopt "exit 75" from a postinst as meaning the postinst wants to be delayed until first boot.  Any other exit code is an error, and should result in a clear warning (and re-run at first boot).
Comment 1 Ross Burton 2016-03-15 13:38:12 UTC
Oh I chose 75 as there's an attempt at standardising exit codes in sysexits.h, and 75 is EX_TEMPFAIL ("temporary failure, try again later").
Comment 2 Alexander Kanavin 2017-11-08 16:28:20 UTC
I think my solution in bug 11096 is better (and already comes with a working patchset ;)
Comment 3 Alexander Kanavin 2018-01-31 10:16:40 UTC
Patchset merged to master:
http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146895.html