<?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>15130</bug_id>
          
          <creation_ts>2023-06-01 14:58:32 +0000</creation_ts>
          <short_desc>bitbake should warn if a function is defined only for specific cases</short_desc>
          <delta_ts>2026-02-26 16:19: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>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>ACCEPTED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>6.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Trevor Gamblin">tgamblin</reporter>
          <assigned_to name="Trevor Gamblin">tgamblin</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</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>95613</commentid>
    <comment_count>0</comment_count>
    <who name="Trevor Gamblin">tgamblin</who>
    <bug_when>2023-06-01 14:58:32 +0000</bug_when>
    <thetext>Related to https://bugzilla.yoctoproject.org/show_bug.cgi?id=15129, it is possible to define a function in class or recipe files with specific variants for target, native, etc. in such a way that a cryptic failure may be observed if there is no &quot;default&quot; version. For example, if:

foo_rm_bar:class-target () {
        ...
}

foo_rm_bar:class-native () {
        ...
}

then the following should also be present to handle other cases:

foo_rm_bar () {
        :
}

otherwise failures may occur that misleadingly suggest issues with the packages themselves. If functions are incompletely defined this way, bitbake should be able to warn the user.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>