Bug 8565

Summary: Add global preinst/postinst hooks to opkg
Product: [Yocto Project Subprojects] opkg Reporter: Alejandro del Castillo <alejandro.delcastillo>
Component: opkgAssignee: Alex Stewart <alex.stewart>
Status: ACCEPTED --- QA Contact:
Severity: enhancement    
Priority: Undecided    
Version: 0.3.3   
Target Milestone: next-minor   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Alejandro del Castillo 2015-10-24 16:55:02 UTC
By adding global hooks (preinst/postinst files in a directory) we can enable several use cases:
  - Rollbacks : clients can use preinst to make snapshots that they can rollback to on postinst in case of errors
  - Drive GPIO lines to make memory readable
Comment 1 Alejandro del Castillo 2017-06-12 18:50:48 UTC
The return code from the global hook should be passed on to opkg. This will enable use cases were global hooks can be used to signal reboots. By passing the global hook return value to opkg, opkg caller can act on it.