Bug 5319

Summary: Need a test to verify firstboot postinst script order
Product: [QA/Testing] Runtime Testing Reporter: Mark Hatle <mark.hatle>
Component: generalAssignee: Francisco Pedraza <francisco.j.pedraza.gonzalez>
Status: RESOLVED FIXED QA Contact: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia>
Severity: normal    
Priority: Medium+ CC: alexandru.c.georgescu, corneliux.stoicescu, francisco.j.pedraza.gonzalez, ross.burton, sgw
Version: 2.1   
Target Milestone: 2.3 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Bug Depends on: 5318    
Bug Blocks: 8433    
Attachments:
Description Flags
Initial test layer to test postinst ordering
none
messages from MM corei7 64 none

Description Mark Hatle 2013-10-04 16:07:52 UTC
Created attachment 1549 [details]
Initial test layer to test postinst ordering

We need to verify that scripts that have to run on first boot execute in the correct order.  Attached is a small layer that implemented two new packages 'A' and 'Z'.  The package 'A' requires 'Z' to be installed first.

Likely this test should be expanded to cover 5 or 6 total packages with an array of dependency ordering.

The purpose of the test is to verify that install/dependency based ordering works properly, not just alphabetic sorting.

Please contact me if you need further information on adding additional tests to prove the system is working right.
Comment 1 Mark Hatle 2013-10-04 16:08:15 UTC
Bug 5318 covers a known issue on ipk and perhaps deb.
Comment 2 Costin 2015-05-29 13:48:55 UTC
Created attachment 2530 [details]
messages from MM corei7 64
Comment 3 Costin 2015-05-29 13:50:57 UTC
Hello,

Please excuse my last comment. It was intended for an other bug
Comment 4 Francisco Pedraza 2016-10-17 19:39:03 UTC
(In reply to comment #0)
> Created attachment 1549 [details]
> Initial test layer to test postinst ordering
> 
> We need to verify that scripts that have to run on first boot execute in the
> correct order.  Attached is a small layer that implemented two new packages
> 'A' and 'Z'.  The package 'A' requires 'Z' to be installed first.
> 
> Likely this test should be expanded to cover 5 or 6 total packages with an
> array of dependency ordering.
> 
> The purpose of the test is to verify that install/dependency based ordering
> works properly, not just alphabetic sorting.
> 
> Please contact me if you need further information on adding additional tests
> to prove the system is working right.

Hi Mark,
Could you please be more specific?
I just reviewed layer.conf, z_1.0.bb and a_1.0.bb files
It is clear the part in how they  are being verified for dependencies. However you say: " Likely this test should be expanded to cover 5 or 6 total packages with an array of dependency ordering. " Which are these packages?
Comment 5 Francisco Pedraza 2016-10-19 22:22:26 UTC
I got the point of the requirement, until now I created the layers and in a simple test the created layers were called properly once qemu boot. 
I am working on get the info from serial output.
Regards
Paco
Comment 6 Francisco Pedraza 2016-11-11 19:40:50 UTC
It is pushed on contrib:
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=fjpedraz/Postinstv2
Running now on AB.
Comment 7 Francisco Pedraza 2016-11-16 00:53:55 UTC
Running on AB: An update was pushed to contrib http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=fjpedraza/postinst
Comment 8 Francisco Pedraza 2016-11-16 00:56:02 UTC
I just sent the path, is under review.
http://lists.openembedded.org/pipermail/openembedded-core/2016-November/128840.html
Regards,
Paco
Comment 9 Francisco Pedraza 2016-11-22 19:59:26 UTC
I created a test case for this: https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1540
Comment 10 Francisco Pedraza 2016-11-22 21:51:27 UTC
An improvement was needed for name convention and structure:
Pushed already on contrib [1] and running on local AB.
[1] - http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=fjpedraz%2Fpostinst-V3