Bug 8433 - Add test for package postinsts
Summary: Add test for package postinsts
Status: RESOLVED FIXED
Alias: None
Product: Runtime Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: 2.2
Hardware: All Multiple
: Medium+ enhancement
Target Milestone: 2.3 M1
Assignee: Jose Perez C
QA Contact: Jair Gonzalez
URL:
Whiteboard:
: 5677 (view as bug list)
Depends on: 5319
Blocks:
  Show dependency tree
 
Reported: 2015-10-02 11:21 UTC by Ross Burton
Modified: 2016-12-16 13:40 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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