<?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>94</bug_id>
          
          <creation_ts>2010-05-25 02:41:11 +0000</creation_ts>
          <short_desc>oprofile related package is not included in the qemu rootfs even if selected</short_desc>
          <delta_ts>2010-12-21 06:07:13 +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>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="liping Ke">liping.ke</reporter>
          <assigned_to name="Dexuan Cui">dexuan.cui</assigned_to>
          <cc>dexuan.cui</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>josh</cc>
    
    <cc>lianhao.lu</cc>
    
    <cc>liping.ke</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          <cf_verified>Program Management</cf_verified>
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>8731</commentid>
    <comment_count>0</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2010-05-25 02:41:11 +0000</bug_when>
    <thetext>Repeated Steps:
1. modify local.conf, make sure tools-profile and dbg-packages are in the &quot;EXTRA_IMAGE_FEATURES&quot; and also set DEBUG_BUILD=&quot;1&quot;. 
2. Rerun bitbake poky-image-sdk, bitbake qemu-native, I found the image is much bigger. And I check meta/classes/poky-image.bbclass, it does contains (tools-profile) related information in base IMAGE_FEATURES.
3. runqemu qemux86, Only oprofile-server is installed in the target image. No oprofile related packages installed in the target image.


ENV:
Ubuntu9.10 Karmic, poky 3.2.1 purple.

Thanks&amp; Regards,
criping</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8732</commentid>
    <comment_count>1</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2010-05-25 02:42:20 +0000</bug_when>
    <thetext>(In reply to comment #0)
I do see those related packages are in the deploy/ipk folders.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8919</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2010-06-17 08:09:37 +0000</bug_when>
    <thetext>What other tools are you expecting to see? The task-poky-tools.bb only includes oprofile and oprofile-ui-server, it&apos;s generally expected that you will run the visualisation tools from your workstation but you can add oprofileui-viewer to EXTRA_IMAGE_FEATURES if you want that to be included in your image.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8927</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2010-06-17 15:41:59 +0000</bug_when>
    <thetext>Ahh, my bad - misunderstanding on my part here. Something&apos;s going wrong because the poky-image-sdk doesn&apos;t contain any oprofile binaries either.

I&apos;m investigating.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9018</commentid>
    <comment_count>4</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2010-07-19 17:04:23 +0000</bug_when>
    <thetext>*** Bug 122 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9021</commentid>
    <comment_count>5</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2010-07-19 19:02:41 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; *** Bug 122 has been marked as a duplicate of this bug. ***

Thanks to Kevin&apos;s help! He helped to find out the root cause:

In meta/packages/tasks/task-poky-tools.bb:

RDEPENDS_task-poky-tools-profile = &quot;\
    oprofile \
    oprofileui-server \
    powertop \
    lttng-control \
    lttng-viewer&quot;

RDEPENDS_task-poky-tools-profile_qemux86 += &quot;valgrind&quot;    # dexuan: ====&gt; this line causes the issue! The 5 packages in RDEPENDS_task-poky-tools-profile aren&apos;t built into the target at all and only valgrind is built into the target!

I tried to change the line to

RDEPENDS_append_task-poky-tools-profile_qemux86 = &quot;valgrind&quot;

, and after 

for i in task-poky-tools poky-image-sdk; do bitbake $i -c clean ; done
for i in task-poky-tools poky-image-sdk; do bitbake $i ; done

I can successfully built all the 6 packages into the target!.

The below is Kevin&apos;s analysis:
----------------------------------------------------------------------
I think it&apos;s related to the sequence of how a variable is parsed:

RDEPENDS_task-poky-tools-profile_qemux86 += &quot;valgrind&quot;

For above line, the whole &quot; RDEPENDS_task-poky-tools-profile_qemux86&quot; is a variable
when handling &quot;+=&quot;. As this variable is not defined earlier, it&apos;s equal to:

RDEPENDS_task-poky-tools-profile_qemux86 = &quot;valgrind&quot;

Then later bitbake will handle overrides, which then overrides with previous 
RDEPENDS_task-poky-tools-profile with valgrind.

Bitbake handles append/prepend after overrides, in that way after handling overrides,
we actually get two variables:

RDEPENDS = &quot;\
    oprofile \
    oprofileui-server \
    powertop \
    lttng-control \
    lttng-viewer&quot;

and

RDEPENDS_append = &quot;valgrind&quot;

Finally you&apos;ll get the desired effect for a combined RDEPENDS. :-)
----------------------------------------------------------------------


I&apos;m working with Liping to try oprifile in notebook.
I will send out the fix and update patches in a couple of hours.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9025</commentid>
    <comment_count>6</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2010-07-19 23:10:15 +0000</bug_when>
    <thetext>Only installing the oprofile things into the target image is not enought: we need also to build the linux kernel with oprofile support(CONFIG_OPROFILE=y) --meta/packages/linux/linux-2.6.33.2/qemux86/defconfig it&apos;s there, but in 
meta-moblin/packages/linux/linux-moblin-2.6.33.2/defconfig-{netbook, menlow}, it&apos;s not there. So I did the following:

1) ensure there is CONFIG_OPROFILE=y in meta-moblin/packages/linux/linux-moblin-2.6.33.2/defconfig-netbook;

2) 
bitbake linux-moblin -c clean
bitbake poky-image-sato-live -c clean
bitbake linux-moblin
bitbake poky-image-sato-live.

After the above, Liping can use the oprofile fine in her Netbook box.
I suppose emenlow should be the similar.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9026</commentid>
    <comment_count>7</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2010-07-19 23:18:25 +0000</bug_when>
    <thetext>find another thing:
seems network driver is not in by default, we need to enable network driver in the similar way. I guess it should be e1000, I will try it.

Thanks&amp; Regards,
criping</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9116</commentid>
    <comment_count>8</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2010-07-28 02:04:50 +0000</bug_when>
    <thetext>this bug has been fixed. Now oprofile tools are included in sdk packages.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9124</commentid>
    <comment_count>9</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2010-07-28 17:50:26 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; this bug has been fixed. Now oprofile tools are included in sdk packages.
Thanks for the testing! 
So let me mark it FIXED.

Liping, pls mark it VERIFIED. :-)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>