<?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>4877</bug_id>
          
          <creation_ts>2013-07-19 11:01:54 +0000</creation_ts>
          <short_desc>&apos;bitbake -C&apos; does not throw error for invalid task</short_desc>
          <delta_ts>2013-10-01 14:23:04 +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.5</version>
          <rep_platform>x86</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>Low</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stoicescu Cornel">corneliux.stoicescu</reporter>
          <assigned_to name="Petter">petter</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>petter</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</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>34701</commentid>
    <comment_count>0</comment_count>
      <attachid>1340</attachid>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-07-19 11:01:54 +0000</bug_when>
    <thetext>Created attachment 1340
cooker log

Poky configuration:

Build Configuration:
BB_VERSION        = &quot;1.19.1&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;Ubuntu-12.04&quot;
TARGET_SYS        = &quot;x86_64-poky-linux&quot;
MACHINE           = &quot;qemux86-64&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;1.4+snapshot-20130719&quot;
TUNE_FEATURES     = &quot;m64&quot;
TARGET_FPU        = &quot;&quot;
meta
meta-yocto
meta-yocto-bsp    = &quot;master:31e6eee860b5f9f4ac9ef0889bcff5648de6e3f9&quot;

Steps to reproduce:

&quot;
lserban@computer1:~/work/poky/build$ bitbake man

lserban@computer1:~/work/poky/build$ bitbake -C invalid_task man

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Tainting hash to force rebuild of task /home/lserban/work/poky/meta/recipes-extended/man/man_1.6g.bb, do_invalid_task
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 782 tasks of which 782 didn&apos;t need to be rerun and all succeeded.

lserban@computer1:~/work/poky/build$ bitbake -cclean man

lserban@computer1:~/work/poky/build$ bitbake -C invalid_task man

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Tainting hash to force rebuild of task /home/lserban/work/poky/meta/recipes-extended/man/man_1.6g.bb, do_invalid_task
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 782 tasks of which 780 didn&apos;t need to be rerun and all succeeded.
&quot;


See attached the cooker log for the last command. Even though the task does not exist, the man package is built.

EXPECTED OUTCOME: Error should be presented for invalid task.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34793</commentid>
    <comment_count>1</comment_count>
    <who name="Petter">petter</who>
    <bug_when>2013-07-23 21:54:52 +0000</bug_when>
    <thetext>I might be wrong, but I don&apos;t think this is a fault (perhapes It could be a warning or note). I think it&apos;s supposed to work like this. If for example &apos;bitbake -c invalid_task man&apos; was successful (and no addtask for do_invalid_task exists..), it should have been a fault.

But when giving bitbake &apos;-C&apos; it will only remove a stamp file and if the stamp file don&apos;t exists nothing bad happens except that no task has a dependency to &apos;invalid_task&apos; so nothing needs to be rebuild.. So except if you specify that a task is &apos;nostamp&apos;, I think it&apos;s OK that no error occurs.

For example do_listtasks (when it should be a fault)
$ bitbake -C listtasks man
...
ERROR: Task do_listtasks is marked nostamp, cannot invalidate this task

Perhapes a notification could be added e.g. &quot;this task don&apos;t exist, so it will not have any effect&quot;.

Comments about this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34796</commentid>
    <comment_count>2</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-07-24 08:02:29 +0000</bug_when>
    <thetext>A notification sounds good to me as long as the user understands why it&apos;s not an error or a warning from it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34800</commentid>
    <comment_count>3</comment_count>
    <who name="Petter">petter</who>
    <bug_when>2013-07-24 08:58:00 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; A notification sounds good to me as long as the user understands why it&apos;s
&gt; not an error or a warning from it.

After some thoughts I think a warning is more correct after all. Maybe something like:

----

NOTE: Preparing runqueue
WARNING: Task do_invalid_task does not exist, invalidate this ta
sk will have no effect
NOTE: Tainting hash to force rebuild of task...
...

----</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34802</commentid>
    <comment_count>4</comment_count>
    <who name="Petter">petter</who>
    <bug_when>2013-07-24 10:11:51 +0000</bug_when>
    <thetext>Change to accepted since this is clearly a bug. Even if error might be a little bit to hard, at least a warning or note should be displayed to the user.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34803</commentid>
    <comment_count>5</comment_count>
    <who name="Petter">petter</who>
    <bug_when>2013-07-24 10:20:36 +0000</bug_when>
    <thetext>Started with a solution that adds a check in &apos;bitbake/lib/bb/runqueue.py&apos; and displays a warning if the task does not exists for the target/recipe.

Suggestion (as in my previous comment).

----

NOTE: Preparing runqueue
WARNING: Task do_invalid_task does not exist, invalidate this ta
sk will have no effect
NOTE: Tainting hash to force rebuild of task...
...

----</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35066</commentid>
    <comment_count>6</comment_count>
    <who name="Petter">petter</who>
    <bug_when>2013-07-29 09:26:38 +0000</bug_when>
    <thetext>Send for review:

The following changes since commit 67864ca79da08df752487a3a4e1a975546da123d:

  systemd: Remove systemd_unitdir if systemd is not in distro features (2013-07-24 11:35:39 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib petmab/bug/4877
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=petmab/bug/4877</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35568</commentid>
    <comment_count>7</comment_count>
    <who name="Petter">petter</who>
    <bug_when>2013-08-10 13:06:20 +0000</bug_when>
    <thetext>Fixed in commit:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=bd1c441a210cae03fb6006c996227211cc29056b</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37419</commentid>
    <comment_count>8</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-10-01 14:23:04 +0000</bug_when>
    <thetext>When issuing the command in step 2) from description, the user receives a coherent warning message:
WARNING: Task do_invalid_task does not exist, invalidating this task will have no effect

Setting to VERIFIED for:
poky master:2f64fae60b3f61a2c45dc9e5314d2d16b1e64605</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>1340</attachid>
            <date>2013-07-19 11:01:54 +0000</date>
            <delta_ts>2013-07-19 11:01:54 +0000</delta_ts>
            <desc>cooker log</desc>
            <filename>cooker_log</filename>
            <type>application/octet-stream</type>
            <size>2342</size>
            <attacher name="Stoicescu Cornel">corneliux.stoicescu</attacher>
            
              <data encoding="base64">CkJ1aWxkIENvbmZpZ3VyYXRpb246CkJCX1ZFUlNJT04gICAgICAgID0gIjEuMTkuMSIKQlVJTERf
U1lTICAgICAgICAgPSAieDg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