Bug 9658 - Detect postinst failing verses asking to be delayed?
Summary: Detect postinst failing verses asking to be delayed?
Status: RESOLVED OBSOLETE
Alias: None
Product: opkg
Classification: Yocto Project Subprojects
Component: opkg (show other bugs)
Version: 0.3.1
Hardware: All Multiple
: Undecided normal
Target Milestone: ---
Assignee: Alejandro del Castillo
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-05-20 15:19 UTC by Ross Burton
Modified: 2018-02-03 21:03 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2016-05-20 15:19:53 UTC
It would be useful if there were a way to distinguish between a postinst failing because of errors or a postinst deciding to delay its execution until first boot in the install log.  At the moment all non-successful postinst are assumed to be delayed on purpose.

I suggest exit 75 for "I wish to be executed on the host please" (#define EX_TEMPFAIL 75 is a semi-standard in sysexits.h) and anything else being reported differently.  The goal being that OE's rootfs task can warn when postinsts are delayed without using exit 75 and we can notice if eg a postinst that should run on the build host is failing.
Comment 1 Alejandro del Castillo 2016-12-09 19:35:57 UTC
Shouldn't that be a convention on how postinst are authored and not part of opkg?

 pkg_postinst_PACKAGENAME() {
     if [ x"$D" = "x" ]; then
          # Actions to carry out on the device go here
     else
          exit 75
     fi
     }
Comment 2 Ross Burton 2018-02-03 21:03:09 UTC
Alex's patches make this moot, closing.