Created attachment 4375 [details] screenshot for 2.6M3RC1 Issue has been observed with 2.6M3RC1 release. Regression : Issue is not reproducible with 2.6M2RC1 release Steps to reproduce : Step 1: Download the poky source and set environment Step 2: Add the following lines to a .bb file. For expample, meta/recipes-connectivity/openssh/openssh_6.2p2.bb: pkg_postinst_$ {PN} () { #!/bin/sh -e if [ x"$D" = "x" ]; then echo "List directory to check the output log" ls / echo "List nonexist directory to check the stderr redirection log" ls /nonexist else exit 1 fi } Make sure the feature "debug-tweaks" is added in conf/local.conf Step 3: Add ssh-server-openssh to EXTRA_IMAGE_FEATURES in local.conf Step 4: Build core-image-minimal Not able to build image as mentioned in screen shot. Logs for 2.6M3RC1: Initialising tasks: 100% |##############################################################################################################################| Time: 0:00:01 Sstate summary: Wanted 2 Found 0 Missed 2 Current 733 (0% match, 99% complete) NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks ERROR: core-image-minimal-1.0-r0 do_rootfs: Postinstall scriptlets of ['openssh'] have failed. If the intention is to defer them to first boot, then please place them into pkg_postinst_ontarget_${PN} (). Deferring to first boot via 'exit 1' is no longer supported. Details of the failure are in /data/pankajsx/2.6M3RC1/POKY_2ndOCT/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_rootfs. ERROR: core-image-minimal-1.0-r0 do_rootfs: Function failed: do_rootfs ERROR: Logfile of failure stored in: /data/pankajsx/2.6M3RC1/POKY_2ndOCT/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_rootfs.86494 ERROR: Task (/data/pankajsx/2.6M3RC1/POKY_2ndOCT/poky/meta/recipes-core/images/core-image-minimal.bb:do_rootfs) failed with exit code '1' NOTE: Tasks Summary: Attempted 2402 tasks of which 2401 didn't need to be rerun and 1 failed. Summary: 1 task failed: /data/pankajsx/2.6M3RC1/POKY_2ndOCT/poky/meta/recipes-core/images/core-image-minimal.bb:do_rootfs Summary: There were 2 ERROR messages shown, returning a non-zero exit code. pankajsx@andromeda02:/data/pankajsx/2.6M3RC1/POKY_2ndOCT/poky/build$ Logs for 2.6M2RC1: Initialising tasks: 100% |##############################################################################################################################| Time: 0:00:02 NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks WARNING: core-image-minimal-1.0-r0 do_rootfs: Intentionally failing postinstall scriptlets of ['openssh'] to defer them to first boot is deprecated. Please place them into pkg_postinst_ontarget_$ {PN} (). If deferring to first boot wasn't the intent, then scriptlet failure may mean an issue in the recipe, or a regression elsewhere. Details of the failure are in /data/pankajsx/2.6M2RC1/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_rootfs. WARNING: core-image-minimal-1.0-r0 do_rootfs: [log_check] core-image-minimal: found 2 warning messages in the logfile: [log_check] warning: %post(openssh-7.7p1-r0.core2_64) scriptlet failed, exit status 1 [log_check] WARNING: Intentionally failing postinstall scriptlets of ['openssh'] to defer them to first boot is deprecated. Please place them into pkg_postinst_ontarget_${PN} (). NOTE: Tasks Summary: Attempted 3722 tasks of which 3713 didn't need to be rerun and all succeeded. Summary: There were 2 WARNING messages shown. Please find the attached screenshot for 2.6M3RC1.
I believe we need to update the test case to use pkg_postinst_ontarget_${PN} instead of pkg_postinst_${PN} Could someone retest with that and see if that works correctly please?
As suggested by Richard,I used pkg_postinst_ontarget_${PN} instead of pkg_postinst_${PN} Now the issue is not reproducible. So should I update test steps for the QA with suggestion provided.
A solution has been found, I am moving out of NEEDINFO.
Closing as a not a bug as issue is not reproducible with suggested changes.