Bug 8433

Summary: Add test for package postinsts
Product: [QA/Testing] Runtime Testing Reporter: Ross Burton <ross.burton>
Component: generalAssignee: Jose Perez C <jose.perez.carranza>
Status: RESOLVED FIXED QA Contact: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia>
Severity: enhancement    
Priority: Medium+ CC: bill.randle, leonardo.sandoval.gonzalez
Version: 2.2   
Target Milestone: 2.3 M1   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on: 5319    
Bug Blocks:    

Description Ross Burton 2015-10-02 11:21:21 UTC
We need to verify that package postinsts are correctly executed in all situations.  Something like this:

image contains test-postinst-rootfs and test-postinst-delayed packages, one of these runs at rootfs time and the other refuses to run at rootfs time and should run at first boot.  They can simply touch a file to indicate that they've been ran.

Build the image, check the contents *before* booting, verify that test-postinst-rootfs has ran it's maintainer scripts and -delayed has not.  Boot in qemu, then verify that both -rootfs and -delayed have touched their files.

Repeat for both sysvinit and systemd, and for rpm/ipk/dpkg (six combinations in total).
Comment 1 Jose Perez C 2016-11-07 14:03:42 UTC
*** Bug 5677 has been marked as a duplicate of this bug. ***
Comment 2 Jose Perez C 2016-11-29 14:29:07 UTC
Patch sent to contrib and tested on top of the patch sent by Francisco for bug 5319 is working correctly.  

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=JosePerez/postinstall-rootfs-boot&id=f1d954cac589c4a9401f4027039eb0a27a4dc64c