To make it easier to debug postinstall problems, the output of the on-device postinstall scripts should be written to a log file. (Probably as a debug-tweaks feature)
FWIW, I did this when debugging on-device postinst with ipk: diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc index 28cc6a6..dd7bfef 100644 --- a/meta/recipes-devtools/opkg/opkg.inc +++ b/meta/recipes-devtools/opkg/opkg.inc @@ -57,7 +57,7 @@ if [ "x$D" != "x" ]; then install -d $D${sysconfdir}/rcS.d # this happens at S98 where our good 'ole packages script used to run echo "#!/bin/sh -opkg-cl configure +opkg-cl configure 2>&1 >/var/log/postinst.log rm -f /${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts " > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
Patches are merged to Yocto: 9ed59a5d1897354e9d4a6d1179db50c1e04435a3 f9cfc9f37a375c858dcd62c46617b4d2b3401ea2 0276db5e64e2a233c673e55c3ac1fdefe3030f39
Branch: poky/master Git rev: 4da406cd50cf02a63ed76810a670aba1eb561c79 For a sato-sdk image, the opkg would also be installed even if the package format is rpm. It will choose the incorrect package management command in S98run-postinsts: ############### $ cat /etc/rcS.d/S98run-postinsts #!/bin/sh opkg-cl configure >/var/log/postinstall.log 2>&1 rm -f //etc/rcS.d/S98run-postinsts ############### Reopen it.
Both rpm and opkg are installed in sato-sdk image though PACKAGE_CLASSES is set to package_rpm, file /etc/rcS.d/S98run-postinsts provided by rpm is covered by opkg.
Send patch to fix the overwrite issue.
(In reply to comment #3) > Branch: poky/master > Git rev: 4da406cd50cf02a63ed76810a670aba1eb561c79 > > For a sato-sdk image, the opkg would also be installed even if the package > format is rpm. It will choose the incorrect package management command in > S98run-postinsts: > ############### > $ cat /etc/rcS.d/S98run-postinsts > #!/bin/sh > opkg-cl configure >/var/log/postinstall.log 2>&1 > rm -f //etc/rcS.d/S98run-postinsts > ############### > > > Reopen it. This bug is not caused by implementing this feature, please open a new bug to describe it and close this one. Thanks.
As Kai's mention, I open a new bug 4231. This feature has been implemented. Verified it.