<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>3223</bug_id>
          
          <creation_ts>2012-10-03 19:18:45 +0000</creation_ts>
          <short_desc>Save postinst logs in debug-tweaks mode</short_desc>
          <delta_ts>2013-04-09 08:10:04 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>(D6)</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.4 M6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Kai Kang">kai.kang</assigned_to>
          <cc>liezhi.yang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
    
    <cc>zhenfeng.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>26175</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2012-10-03 19:18:45 +0000</bug_when>
    <thetext>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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26893</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2012-10-25 08:33:23 +0000</bug_when>
    <thetext>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 [ &quot;x$D&quot; != &quot;x&quot; ]; then
        install -d $D${sysconfdir}/rcS.d
        # this happens at S98 where our good &apos;ole packages script used to run
        echo &quot;#!/bin/sh
-opkg-cl configure
+opkg-cl configure 2&gt;&amp;1 &gt;/var/log/postinst.log
 rm -f /${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
 &quot; &gt; $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
        chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30553</commentid>
    <comment_count>2</comment_count>
    <who name="Kai Kang">kai.kang</who>
    <bug_when>2013-03-08 01:55:35 +0000</bug_when>
    <thetext>Patches are merged to Yocto:
9ed59a5d1897354e9d4a6d1179db50c1e04435a3
f9cfc9f37a375c858dcd62c46617b4d2b3401ea2
0276db5e64e2a233c673e55c3ac1fdefe3030f39</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30724</commentid>
    <comment_count>3</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-03-15 02:55:08 +0000</bug_when>
    <thetext>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 &gt;/var/log/postinstall.log 2&gt;&amp;1
rm -f //etc/rcS.d/S98run-postinsts
###############


Reopen it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30729</commentid>
    <comment_count>4</comment_count>
    <who name="Kai Kang">kai.kang</who>
    <bug_when>2013-03-15 05:38:26 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31072</commentid>
    <comment_count>5</comment_count>
    <who name="Kai Kang">kai.kang</who>
    <bug_when>2013-03-25 07:28:28 +0000</bug_when>
    <thetext>Send patch to fix the overwrite issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31743</commentid>
    <comment_count>6</comment_count>
    <who name="Kai Kang">kai.kang</who>
    <bug_when>2013-04-09 06:29:31 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Branch: poky/master
&gt; Git rev: 4da406cd50cf02a63ed76810a670aba1eb561c79
&gt; 
&gt; For a sato-sdk image, the opkg would also be installed even if the package
&gt; format is rpm. It will choose the incorrect package management command in
&gt; S98run-postinsts: 
&gt; ###############
&gt; $ cat /etc/rcS.d/S98run-postinsts
&gt; #!/bin/sh
&gt; opkg-cl configure &gt;/var/log/postinstall.log 2&gt;&amp;1
&gt; rm -f //etc/rcS.d/S98run-postinsts
&gt; ###############
&gt; 
&gt; 
&gt; Reopen it.

This bug is not caused by implementing this feature, please open a new bug to describe it and close this one.

Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31748</commentid>
    <comment_count>7</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-04-09 08:10:04 +0000</bug_when>
    <thetext>As Kai&apos;s mention, I open a new bug 4231. This feature has been implemented. Verified it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>