<?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>7723</bug_id>
          
          <creation_ts>2015-05-06 15:22:10 +0000</creation_ts>
          <short_desc>Needed a way to identify layer name in bbclass to be able to filter out packages in specific layer.</short_desc>
          <delta_ts>2015-06-16 02:53:02 +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>BitBake</product>
          <component>bitbake</component>
          <version>1.9</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.9 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexander Kanevskiy">alexander.kanevskiy</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>bluelightning</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          <qa_contact name="Costin">costin.c.constantin</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</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>50826</commentid>
    <comment_count>0</comment_count>
    <who name="Alexander Kanevskiy">alexander.kanevskiy</who>
    <bug_when>2015-05-06 15:22:10 +0000</bug_when>
    <thetext>At the moment there is blacklist.bbclass implementation that is able to filter out recipe on global level. It would be good to have ability to filter recipe name or pattern of recipes if they are coming from specific layer. Or another example to implement layer specific &quot;whitelist&quot; of recipes to be used. 
For both of those, there is need to expose variable(s) that would be pointing beside $FILE or $PN from which layer name/path it&apos;s actually coming from.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50830</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-05-06 16:11:12 +0000</bug_when>
    <thetext>I&apos;ve pushed a branch with a patch that adds a function to bb.utils which does this:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=paule/stuff</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51083</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-05-18 15:51:11 +0000</bug_when>
    <thetext>Patch sent for review:
http://patchwork.openembedded.org/patch/93813/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51085</commentid>
    <comment_count>3</comment_count>
    <who name="Alexander Kanevskiy">alexander.kanevskiy</who>
    <bug_when>2015-05-18 16:07:05 +0000</bug_when>
    <thetext>BTW, once it&apos;s get implemented, it would be good to also include in 1.8.x maintenance releases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51232</commentid>
    <comment_count>4</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-05-22 15:43:35 +0000</bug_when>
    <thetext>Sure, I&apos;ve just sent a backport to bitbake 1.26, which will feed into the fido branch in poky when merged.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51281</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-05-27 09:12:48 +0000</bug_when>
    <thetext>Now in the fido branch as well:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=fido&amp;id=ca6ef30c7a33b3860d9b0d0da51d9b8786073170

Marking as resolved.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51710</commentid>
    <comment_count>6</comment_count>
    <who name="Costin">costin.c.constantin</who>
    <bug_when>2015-06-16 02:53:02 +0000</bug_when>
    <thetext>Hello,

Checked this feature and it works.
Steps performed to test it:

1)vi meta/recipes-tests/teste/teste_1.0.0.bb

SUMARY = &quot;test recipe&quot;

LICENSE = &quot;CLOSED&quot;

python do_mytask(){
  bb.note(&quot;running mytest&quot;)
  result = bb.utils.get_file_layer(&quot;/media/cosscat/Touro/5poky/meta/recipes-devtools/m4/m4_1.4.17.bb&quot;,d)
  bb.note(result)
}

addtask do_mytask before do_build

2) bitbake teste
3) cat log.do_mytask
DEBUG: Executing python function do_mytask
NOTE: running mytest
NOTE: core
DEBUG: Python function do_mytask finished 

Marking as verified.

Costin</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>