<?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>8805</bug_id>
          
          <creation_ts>2015-12-14 16:08:12 +0000</creation_ts>
          <short_desc>Detect and warn people naming functions something_remove_something</short_desc>
          <delta_ts>2020-11-09 17:10:47 +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>2.0</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>3.3 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Chee Yang">chee.yang.lee</assigned_to>
          <cc>chee.yang.lee</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>mostthingsweb</cc>
    
    <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>57253</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-12-14 16:08:12 +0000</bug_when>
    <thetext>If a recipe has a function that contains _remove the override handling kicks in and generally results in a terse failure at parse time:

ERROR: ExpansionError during parsing /home/ross/Yocto/poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.11.bb: Failure expanding variable xcb_remove_python: TypeError: &apos;NoneType&apos; object is not iterable

It would be good if the system at least made the warning more usable, and ideally warned that attempting to name a function with _remove_ in (or _append_) is a bad idea.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87676</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Laplante">mostthingsweb</who>
    <bug_when>2020-07-02 13:45:08 +0000</bug_when>
    <thetext>I&apos;m unable to reproduce this. Maybe it&apos;s been fixed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88533</commentid>
    <comment_count>2</comment_count>
    <who name="Chee Yang">chee.yang.lee</who>
    <bug_when>2020-11-01 23:08:22 +0000</bug_when>
    <thetext>i got error by adding this task to recipe

addtask task_remove_test
do_task_remove_test() {
   # prevent blank task
   echo ${WORKDIR} &gt;&gt; ${WORKDIR}/test
}


same error for _append_ and _prepend_



Error:

  File &quot;/data/4T/poky-master/bitbake/lib/bb/codeparser.py&quot;, line 343, in ShellParser.parse_shell(value=None):

    &gt;        self._parse_shell(value)
             self.execs = set(cmd for cmd in self.allexecs if cmd not in self.funcdefs)
  File &quot;/data/4T/poky-master/bitbake/lib/bb/codeparser.py&quot;, line 354, in ShellParser._parse_shell(value=None):
             except Exception:
    &gt;            bb.error(&apos;Error during parse shell code, the last 5 lines are:\n%s&apos; % &apos;\n&apos;.join(value.split(&apos;\n&apos;)[-5:]))
                 raise
AttributeError: &apos;NoneType&apos; object has no attribute &apos;split&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88586</commentid>
    <comment_count>3</comment_count>
    <who name="Chee Yang">chee.yang.lee</who>
    <bug_when>2020-11-09 17:10:47 +0000</bug_when>
    <thetext>close with this commit 
https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=03f8c9d9f91ac9efe54e22e78575e4a248cfa62f</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>