Bug 9261

Summary: Can't distinguish between delayed and failed postinst
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: deploymentAssignee: Unassigned <unassigned>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium+ CC: alex.kanavin, jose.perez.carranza, richard.purdie
Version: 2.1   
Target Milestone: Future   
Hardware: All   
OS: Multiple   
See Also: https://bugzilla.yoctoproject.org/show_bug.cgi?id=11096
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

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