| Summary: | Save postinst logs in debug-tweaks mode | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Ross Burton <ross.burton> |
| Component: | core | Assignee: | Kai Kang <kai.kang> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | Medium | CC: | liezhi.yang, meta.mr.watcher, meta.watcher, sgw, yi.zhao, zhenfeng.zhao |
| Version: | 1.3 | ||
| Target Milestone: | 1.4 M6 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | (D6) | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | --- | |
|
Description
Ross Burton
2012-10-03 19:18:45 UTC
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. |