<?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>4160</bug_id>
          
          <creation_ts>2013-04-01 07:54:37 +0000</creation_ts>
          <short_desc>rpm-postinsts not installed on sato images</short_desc>
          <delta_ts>2013-04-02 17:02:07 +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.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.4 M6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chen Qi">Qi.Chen</reporter>
          <assigned_to name="Chen Qi">Qi.Chen</assigned_to>
          <cc>hongxu.jia</cc>
    
    <cc>kai.kang</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>ning.zhang</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sen.zhang</cc>
    
    <cc>yi.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>31318</commentid>
    <comment_count>0</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2013-04-01 07:54:37 +0000</bug_when>
    <thetext>rpm-postinsts is not installed on sato images.
In fact, for now, rpm-postinsts will not be installed if &apos;package-management&apos; is in IMAGE_FEATURES.

meta/classes/image.bbclass:ROOTFS_BOOTSTRAP_INSTALL = &quot;${@base_contains(&quot;IMAGE_FEATURES&quot;, &quot;package-management&quot;, &quot;&quot;, &quot;${ROOTFS_PKGMANAGE_BOOTSTRAP}&quot;,d)}&quot;

(This means that if package manager is not installed, we fall back to a bootstrap method, which is &apos;run-postinst&apos; in case of ipk and deb. But rpm is a little different. Running its postinst scripts doesn&apos;t require a package manager installed on target, as these scripts are just shell scripts.)

meta/classes/image.bbclass:export PACKAGE_INSTALL ?= &quot;${IMAGE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL} ${FEATURE_INSTALL}&quot;

Anyway, rpm-postinsts should be installed no matter package-management is in IMAGE_FEATURES or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31319</commentid>
    <comment_count>1</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2013-04-01 08:00:12 +0000</bug_when>
    <thetext>Below is patch to try to fix this problem. Any comment or suggestion is welcome.

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 9721a6b..468aaa0 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -21,7 +21,8 @@ IMAGE_FEATURES ?= &quot;&quot;
 IMAGE_FEATURES[type] = &quot;list&quot;
 
 # rootfs bootstrap install
-ROOTFS_BOOTSTRAP_INSTALL = &quot;${@base_contains(&quot;IMAGE_FEATURES&quot;, &quot;package-management&quot;, &quot;&quot;, &quot;${ROOTFS_PKGMANAGE_BOOTSTRAP}&quot;,d)}&quot;
+# We use weak assignment to allow override.
+ROOTFS_BOOTSTRAP_INSTALL ?= &quot;${@base_contains(&quot;IMAGE_FEATURES&quot;, &quot;package-management&quot;, &quot;&quot;, &quot;${ROOTFS_PKGMANAGE_BOOTSTRAP}&quot;,d)}&quot;
 
 # packages to install from features
 FEATURE_INSTALL = &quot;${@&apos; &apos;.join(oe.packagegroup.required_packages(oe.data.typed_value(&apos;IMAGE_FEATURES&apos;, d), d))}&quot;
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index d373dab..9a06a7d 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -4,6 +4,7 @@
 
 ROOTFS_PKGMANAGE = &quot;rpm smartpm&quot;
 ROOTFS_PKGMANAGE_BOOTSTRAP = &quot;rpm-postinsts&quot;
+ROOTFS_BOOTSTRAP_INSTALL = &quot;${ROOTFS_PKGMANAGE_BOOTSTRAP}&quot;
 
 # Add 50Meg of extra space for Smart
 IMAGE_ROOTFS_EXTRA_SPACE_append = &quot;${@base_contains(&quot;PACKAGE_INSTALL&quot;, &quot;smartpm&quot;, &quot; + 51200&quot;, &quot;&quot; ,d)}&quot;

//Chen Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31382</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-04-02 17:02:07 +0000</bug_when>
    <thetext>Fixed in master: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=f802d7f0c409836cdd0ee8b32fd06eeaea8cca93</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>