Created attachment 1340 [details] cooker log Poky configuration: Build Configuration: BB_VERSION = "1.19.1" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "Ubuntu-12.04" TARGET_SYS = "x86_64-poky-linux" MACHINE = "qemux86-64" DISTRO = "poky" DISTRO_VERSION = "1.4+snapshot-20130719" TUNE_FEATURES = "m64" TARGET_FPU = "" meta meta-yocto meta-yocto-bsp = "master:31e6eee860b5f9f4ac9ef0889bcff5648de6e3f9" Steps to reproduce: " 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'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't need to be rerun and all succeeded. " 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.
I might be wrong, but I don't think this is a fault (perhapes It could be a warning or note). I think it's supposed to work like this. If for example 'bitbake -c invalid_task man' was successful (and no addtask for do_invalid_task exists..), it should have been a fault. But when giving bitbake '-C' it will only remove a stamp file and if the stamp file don't exists nothing bad happens except that no task has a dependency to 'invalid_task' so nothing needs to be rebuild.. So except if you specify that a task is 'nostamp', I think it'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. "this task don't exist, so it will not have any effect". Comments about this?
A notification sounds good to me as long as the user understands why it's not an error or a warning from it.
(In reply to comment #2) > A notification sounds good to me as long as the user understands why it's > 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... ... ----
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.
Started with a solution that adds a check in 'bitbake/lib/bb/runqueue.py' 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... ... ----
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
Fixed in commit: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=bd1c441a210cae03fb6006c996227211cc29056b
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