<?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>7006</bug_id>
          
          <creation_ts>2014-12-02 11:03:10 +0000</creation_ts>
          <short_desc>classes containing a dash in the name cannot use &quot;EXPORT_FUNCTIONS&quot;</short_desc>
          <delta_ts>2015-01-08 10:40:14 +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>unspecified</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.8 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Diego">diego.ml</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <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>47282</commentid>
    <comment_count>0</comment_count>
    <who name="Diego">diego.ml</who>
    <bug_when>2014-12-02 11:03:10 +0000</bug_when>
    <thetext>Using EXPORT_FUNCTIONS, as described here:
http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#flexible-inheritance-for-class-functions
works only when the class has no dashes in the name.

While classes with a dash in the name are valid (there are plenty in oe-core/poky itself), they cause error when using EXPORT_FUNCTIONS.

How to reproduce:

1) define the following &quot;dashed-class.bbclass&quot;:
dashed-class_do_custom_function() {
        # do nothing
}

EXPORT_FUNCTIONS do_custom_function

2) use do_custom_function inside a recipe

Bitbaking will result in the following error:
dashed-class_do_custom_function: not found


Renaming the class to &quot;nondashedclass.bbclass&quot; and fixing the function definition accordingly doesn&apos;t cause the problem, so my guess is that dashed are not parsed properly in functions definition.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47799</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-01-08 10:40:14 +0000</bug_when>
    <thetext>dash characters are illegal in sh function names. There isn&apos;t anything we can do about that (and we don&apos;t want to mandate bash, we can&apos;t due to our sh parser anyway) so I&apos;ve made sure you get a clear early error at parse time from bitbake instead explaining the problem:

http://git.yoctoproject.org/cgit.cgi/poky/patch/?id=2e26745a134373dfde3aa2b16fef3df720436e77</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>