<?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>5702</bug_id>
          
          <creation_ts>2014-01-03 14:37:19 +0000</creation_ts>
          <short_desc>Dependency on dbus-ptest-ptest increases image size significantly</short_desc>
          <delta_ts>2014-04-28 01:35:16 +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.6</version>
          <rep_platform>All</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.6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Chong Lu">chong.lu</assigned_to>
          <cc>bjst</cc>
    
    <cc>gabriel.barbu</cc>
    
    <cc>jacob.kroon</cc>
    
    <cc>lpapp</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>net147</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>39659</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-01-03 14:37:19 +0000</bug_when>
    <thetext>Since we now have ptest in DISTRO_FEATURES in poky, there is now a hard dependency from the dbus package on dbus-ptest-ptest. In meta/recipes-core/dbus/dbus.inc we have:

meta/recipes-core/dbus/dbus.inc:RDEPENDS_dbus = &quot;${@base_contains(&apos;DISTRO_FEATURES&apos;, &apos;ptest&apos;, &apos;dbus-ptest-ptest&apos;, &apos;&apos;, d)}&quot;

This means that any image that contains dbus, regardless of whether ptest-pkgs is in IMAGE_FEATURES, will get this package. dbus-ptest-ptest is 38MB here in my test environment which is a pretty egregious size increase for most small images. We need to find a way to not pull this package in by default even if ptest has to be enabled at the distro level.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39713</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2014-01-09 15:42:39 +0000</bug_when>
    <thetext>Shouldn&apos;t this be on the dbus-ptest package and not dbus?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39731</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-01-10 09:41:16 +0000</bug_when>
    <thetext>Right, I think if we add a dummy ${PN}-ptest package to dbus.inc, set ALLOW_EMPTY on it, and then change the line referenced above to RDEPENDS_${PN}-ptest = ..., it should fix the problem since dbus-ptest should automatically be brought into the image when &quot;ptest-pkgs&quot; is in IMAGE_FEATURES and thus dbus-ptest-ptest will along with it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39852</commentid>
    <comment_count>3</comment_count>
    <who name="Chong Lu">chong.lu</who>
    <bug_when>2014-01-16 10:20:27 +0000</bug_when>
    <thetext>solution 1:
Add following code in dbus.inc:

diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index 86d6caa..0505fff 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -6,9 +6,12 @@ LICENSE = &quot;AFL-2 | GPLv2+&quot;
 LIC_FILES_CHKSUM = &quot;file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
                     file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c&quot;
 DEPENDS = &quot;expat virtual/libintl&quot;
-RDEPENDS_dbus = &quot;${@base_contains(&apos;DISTRO_FEATURES&apos;, &apos;ptest&apos;, &apos;dbus-ptest-ptest&apos;, &apos;&apos;, d)} initscripts-functions&quot;
+RDEPENDS_dbus = &quot;initscripts-functions&quot;
 RDEPENDS_dbus_class-native = &quot;&quot;
 RDEPENDS_dbus_class-nativesdk = &quot;&quot;
+PACKAGES += &quot;dbus-ptest&quot;
+ALLOW_EMPTY_${PN}-ptest = &quot;1&quot;
+RDEPENDS_${PN}-ptest = &quot;${@base_contains(&apos;DISTRO_FEATURES&apos;, &apos;ptest&apos;, &apos;dbus-test&apos;, &apos;&apos;, d)}&quot;
 
 SRC_URI = &quot;http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
            file://tmpdir.patch \

And rename dbus-ptest_1.6.18.bb to dbus-test_1.6.18.bb.

Issue:
When &quot;ptest-pkgs&quot; is in IMAGE_FEATURES and &quot;ptest&quot; is in DISTRO_FEATURES, dbus-test package is generated, but it doesn&apos;t install in image.

solution 2:
If I change RDEPENDS_${PN}-ptest = &quot;${@base_contains(&apos;DISTRO_FEATURES&apos;, &apos;ptest&apos;, &apos;dbus-test&apos;, &apos;&apos;, d)}&quot; to RDEPENDS_${PN}-ptest = &quot;${@base_contains(&apos;DISTRO_FEATURES&apos;, &apos;ptest&apos;, &apos;dbus-test-ptest&apos;, &apos;&apos;, d)}&quot;, it&apos;s the same result with no patch. Any image that contains dbus, regardless of whether ptest-pkgs is in IMAGE_FEATURES, will get this package.

Do you have any suggestion?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40817</commentid>
    <comment_count>4</comment_count>
    <who name="Laszlo Papp">lpapp</who>
    <bug_when>2014-03-03 04:27:37 +0000</bug_when>
    <thetext>Are there any near term plans to be moving forward with this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40818</commentid>
    <comment_count>5</comment_count>
    <who name="Chong Lu">chong.lu</who>
    <bug_when>2014-03-03 05:51:06 +0000</bug_when>
    <thetext>In three recipes(dbus, dbus-glib, dbus-ptest), they have a circular dependency issue. So I have no way to merge dbus-ptest and dbus in one recipes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40840</commentid>
    <comment_count>6</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-03-03 16:15:15 +0000</bug_when>
    <thetext>Chong, the solutions being discussed don&apos;t involve merging the recipes together, so I&apos;m a bit confused.

Re solution 2 above, why is dbus-test-ptest pulled into the image unconditionally? I can understand why it would be built, but why would a runtime dependency be introduced? Could you please enable buildhistory and check the .dot dependency graphs to find out why?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40907</commentid>
    <comment_count>7</comment_count>
    <who name="Chong Lu">chong.lu</who>
    <bug_when>2014-03-06 06:06:43 +0000</bug_when>
    <thetext>I&apos;ve patched to fix this, will send the patch to the oe-core list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42743</commentid>
    <comment_count>8</comment_count>
    <who name="Gabriel Barbu">gabriel.barbu</who>
    <bug_when>2014-04-18 14:40:14 +0000</bug_when>
    <thetext>Attempting to apply the patch proposed here:
http://article.gmane.org/gmane.comp.handhelds.openembedded.core/50399  
has the following results:
While having ptest in DISTRO_FEATURES:
- For images not having ptest-pkgs in IMAGE_FEATURES, dbus ptest is no longer installed/OK.
- However, for images having ptest-pkgs in IMAGE_FEATURES, dbus ptest is not installed either/NOT OK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42798</commentid>
    <comment_count>9</comment_count>
    <who name="Chong Lu">chong.lu</who>
    <bug_when>2014-04-21 01:59:14 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; Attempting to apply the patch proposed here:
&gt; http://article.gmane.org/gmane.comp.handhelds.openembedded.core/50399  
&gt; has the following results:
&gt; While having ptest in DISTRO_FEATURES:
&gt; - For images not having ptest-pkgs in IMAGE_FEATURES, dbus ptest is no
&gt; longer installed/OK.
&gt; - However, for images having ptest-pkgs in IMAGE_FEATURES, dbus ptest is not
&gt; installed either/NOT OK.

I test the situtation that images have ptest-pkgs in IMAGE_FEATURES and
dbus ptest is installed in /usr/lib/dbus-test directory on target.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42810</commentid>
    <comment_count>10</comment_count>
    <who name="Gabriel Barbu">gabriel.barbu</who>
    <bug_when>2014-04-22 09:22:12 +0000</bug_when>
    <thetext>That’s strange, for me it does not appear installed. Do you include the package in your image as &quot;dbus&quot; or something else, like &quot;dbus-test&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42811</commentid>
    <comment_count>11</comment_count>
    <who name="Chong Lu">chong.lu</who>
    <bug_when>2014-04-22 09:29:54 +0000</bug_when>
    <thetext>(In reply to comment #10)
&gt; That’s strange, for me it does not appear installed. Do you include the
&gt; package in your image as &quot;dbus&quot; or something else, like &quot;dbus-test&quot;?

In my conf/local.conf, I add following lines:
EXTRA_IMAGE_FEATURES += &quot;ptest-pkgs&quot;
CORE_IMAGE_EXTRA_INSTALL += &quot;dbus&quot;

And run &quot;bitbake core-image-minimal&quot;, the dbus-test is installed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42813</commentid>
    <comment_count>12</comment_count>
    <who name="Gabriel Barbu">gabriel.barbu</who>
    <bug_when>2014-04-22 12:50:25 +0000</bug_when>
    <thetext>We have custom images based on using custom package groups.
In this particular case we have a packagegroup-ptest which has all the packages needed (including dbus) in RDEPENDS_${PN}; this packagegroup is included in an image by IMAGE_INSTALL. With this mechanism, we get all ptests installed in the image rootfs/usr/lib, except dbus.

I also tried your approach with EXTRA_IMAGE_FEATURES and CORE_IMAGE_EXTRA_INSTALL, and I still don’t get dbus in the image. But I see in the Yocto manual that “You can add packages using a similar approach through the CORE_IMAGE_EXTRA_INSTALL variable. If you use this variable, only core-image-* images are affected.” so maybe that’s why. 
I will try to investigate where the differences come from, as in principle the mechanisms should be equivalent. I’ll also try with standard core-images.

Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42816</commentid>
    <comment_count>13</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-04-22 14:19:21 +0000</bug_when>
    <thetext>*** Bug 6203 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43030</commentid>
    <comment_count>14</comment_count>
    <who name="Chong Lu">chong.lu</who>
    <bug_when>2014-04-28 01:35:16 +0000</bug_when>
    <thetext>fixed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>