All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: <bitbake-devel@lists.openembedded.org>
Subject: [PATCH 2/2] bitbake: build.py: check dependendent task for addtask
Date: Thu, 25 Apr 2019 18:01:00 +0800	[thread overview]
Message-ID: <d37712258af9b6fedb9e1586ace28908bec88391.1556186399.git.liezhi.yang@windriver.com> (raw)
In-Reply-To: <cover.1556186399.git.liezhi.yang@windriver.com>

The following command is incorrect, but was ignored silently, that may suprise
users:

addtask task after task_not_existed

This patch can check and warn for it. It would be better to also check "before"
tasks, but there is no easier way to do it.

[YOCTO #13282]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 bitbake/lib/bb/build.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 7571421..861e9a9 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -815,6 +815,9 @@ def add_tasks(tasklist, d):
         task_deps['parents'][task] = []
         if 'deps' in flags:
             for dep in flags['deps']:
+                # Check and warn for "addtask task after foo" while foo does not exist
+                if not dep in tasklist:
+                    bb.warn('%s: dependent task %s does not exist!' % (d.getVar('PN'), dep))
                 dep = d.expand(dep)
                 task_deps['parents'][task].append(dep)
 
-- 
2.7.4



  parent reply	other threads:[~2019-04-25 10:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 10:00 [PATCH 0/2] Fixes for addtask and deltask Robert Yang
2019-04-25 10:00 ` [PATCH 1/2] bitbake: BBHandler: Fix " Robert Yang
2019-04-25 10:48   ` Richard Purdie
2019-04-26  3:17     ` Robert Yang
2019-04-25 10:01 ` Robert Yang [this message]
2019-04-25 10:50   ` [PATCH 2/2] bitbake: build.py: check dependendent task for addtask Richard Purdie
2019-04-26  2:49     ` Robert Yang
2019-04-30 12:13       ` Martin Jansa
2019-05-01 10:50       ` Jacob Kroon
2019-05-01 15:30         ` Burton, Ross
2019-05-01 16:48           ` Nicolas Dechesne
2019-05-01 19:42             ` Richard Purdie
2019-05-05  5:56               ` Robert Yang
2019-05-05 10:30                 ` Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d37712258af9b6fedb9e1586ace28908bec88391.1556186399.git.liezhi.yang@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.