From 797a8ee040e5f5eca1973478daddb3c18fef8c5e Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 13 Dec 2016 20:07:10 +1300 Subject: bitbake: cooker: allow buildFile warning to be hidden programmatically If we want to use this function/command internally, we don't want this warning shown. (Bitbake rev: 5cfbb60833e7b12d698c1c2970c17ccf2a4971bf) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'bitbake/lib/bb/cooker.py') diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 48904a52d6..a4aaac59f8 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -1334,15 +1334,16 @@ class BBCooker: raise NoSpecificMatch return matches[0] - def buildFile(self, buildfile, task): + def buildFile(self, buildfile, task, hidewarning=False): """ Build the file matching regexp buildfile """ bb.event.fire(bb.event.BuildInit(), self.expanded_data) - # Too many people use -b because they think it's how you normally - # specify a target to be built, so show a warning - bb.warn("Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.") + if not hidewarning: + # Too many people use -b because they think it's how you normally + # specify a target to be built, so show a warning + bb.warn("Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.") # Parse the configuration here. We need to do it explicitly here since # buildFile() doesn't use the cache -- cgit v1.2.3-54-g00ecf