Bug 12630

Summary: postinst intercepts fail in SDKs
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: deploymentAssignee: Alexander Kanavin <alex.kanavin>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: randy.macleod, stephano
Version: 2.5   
Target Milestone: 2.5 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2018-03-28 06:38:25 UTC
If a SDK needs to run a postinst intercept, be it in the target sysroot or the nativesdk sysroot, it will fail.

This is simply because we don't set INTERCEPT_DIR or run the intercepts, because those are actions that rootfs.py takes, whereas the sdk (sdk.py) uses the package managers directly.

We should probably move the intercept logic somewhere common like package_manager.py, so the sdk code can reuse it.

poky-contrib:ross/interceptargh has a vague attempt at copy/paste which doesn't work (conflating host and target intercepts) which may be interesting as an example of what not to do.

Reproducer:

CORE_IMAGE_EXTRA_INSTALL_append = " glib-networking"
$ bitbake core-image-minimal -c populate_sdk
Comment 1 Alexander Kanavin 2018-04-03 08:52:44 UTC
Patchset posted to list. I took the opportunity to clean up some of the other related things with postinsts, postinsts intercepts and SDKs :)