From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) by mail.openembedded.org (Postfix) with ESMTP id 704697DA31 for ; Mon, 29 Apr 2019 08:12:43 +0000 (UTC) Received: from ALA-HCA.corp.ad.wrs.com ([147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.1) with ESMTPS id x3T8CiCX004953 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL) for ; Mon, 29 Apr 2019 01:12:44 -0700 (PDT) Received: from pek-lpg-core1.wrs.com (128.224.156.132) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server id 14.3.439.0; Mon, 29 Apr 2019 01:12:43 -0700 From: Robert Yang To: Date: Mon, 29 Apr 2019 16:11:59 +0800 Message-ID: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 Subject: [PATCH V2 2/3] bitbake: build.py: check dependendent task for addtask X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Apr 2019 08:12:43 -0000 Content-Type: text/plain 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 --- 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..a83de8d 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