<?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>4069</bug_id>
          
          <creation_ts>2013-03-21 13:21:07 +0000</creation_ts>
          <short_desc>ptest files are packaged into core package</short_desc>
          <delta_ts>2013-04-11 11:46:50 +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>deployment</component>
          <version>1.4</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.4 M6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Björn Stenberg">bjst</reporter>
          <assigned_to name="Björn Stenberg">bjst</assigned_to>
          <cc>richard.purdie</cc>
    
    <cc>sgw</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>30961</commentid>
    <comment_count>0</comment_count>
    <who name="Björn Stenberg">bjst</who>
    <bug_when>2013-03-21 13:21:07 +0000</bug_when>
    <thetext>(copied from oe-core list email 20130320083055.GQ31812@sestofb10.enea.se)

The ${PN}-ptest group is not added to PACKAGES by default in bitbake.conf like
all the other groups. Instead it is added to PACKAGES in ptest.bbclass. This way
it is only added for those recipes that implement ptest.

However it turns out this doesn&apos;t work when package splitting. Instead of
putting ptest files into packages-split/${PN}-ptest, those files are put into
the core ${PN} package which is obviously not what we want.

I&apos;m scratching my head a bit about why this happens, and would like help from
people with deeper bitbake knowledge. I guess the splitting is somehow done
outside the package scope, but why and how do we fix it?

Putting ${PN}-ptest in PACKAGES in bitbake.conf &quot;solves&quot; this issue, but Richard
Purdie was against that earlier since we yet have only a few &quot;ptest enabled&quot;
packages.

# find tmp/work/i586-poky-linux/bash -name run-ptest
tmp/work/i586-poky-linux/bash/4.2-r6/image/usr/lib/bash/ptest/run-ptest
tmp/work/i586-poky-linux/bash/4.2-r6/sysroot-destdir/usr/lib/bash/ptest/run-ptest
tmp/work/i586-poky-linux/bash/4.2-r6/package/usr/lib/bash/ptest/run-ptest
tmp/work/i586-poky-linux/bash/4.2-r6/run-ptest
tmp/work/i586-poky-linux/bash/4.2-r6/packages-split/bash/usr/lib/bash/ptest/run-ptest

We want is the last line to be:

tmp/work/i586-poky-linux/bash/4.2-r6/packages-split/bash-ptest/usr/lib/bash/ptest/run-ptest</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30978</commentid>
    <comment_count>1</comment_count>
    <who name="Björn Stenberg">bjst</who>
    <bug_when>2013-03-21 14:53:12 +0000</bug_when>
    <thetext>Aha, this is caused by ptest.bbclass doing:

  PACKAGES += &quot;${PN}-ptest&quot;

instead of:

  PACKAGES =+ &quot;${PN}-ptest&quot;

Unfortunately, the full solution is not quite that simple. But now I know enough to submit a patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30992</commentid>
    <comment_count>2</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-03-21 15:42:14 +0000</bug_when>
    <thetext>Bjorn, I was just going to look at that this morning, looks like you found the trick, which is the PACKAGES list is greedy by nature, meaning things earlier in the list will match and remove them from consideration by packages later in the list.

I guess I can close this bug then?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30996</commentid>
    <comment_count>3</comment_count>
    <who name="Björn Stenberg">bjst</who>
    <bug_when>2013-03-21 15:50:46 +0000</bug_when>
    <thetext>Yes, I just sent a patch with a proposed solution for this.

Re: closing: Do we close bugs when a fix is found or when a fix is accepted?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31002</commentid>
    <comment_count>4</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-03-21 16:59:02 +0000</bug_when>
    <thetext>Right, I will assign this back to you and you can mark it resolved when the patch is accepted, since this is a bug.  I will pull this into MUT and queue it once we get M5 built.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31924</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-04-11 11:46:50 +0000</bug_when>
    <thetext>Patch was taken into master (http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=44120a053c0cf2c7134bb1ee29854dddf28e4cf8). Please open new bugs for any further issues.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>