[gnome-continuous-yocto/gnomeostree-3.28-rocko: 3734/8267] bitbake: cooker: allow buildFile warning to be hidden programmatically
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 3734/8267] bitbake: cooker: allow buildFile warning to be hidden programmatically
- Date: Sun, 17 Dec 2017 01:02:57 +0000 (UTC)
commit 797a8ee040e5f5eca1973478daddb3c18fef8c5e
Author: Paul Eggleton <paul eggleton linux intel com>
Date: Tue Dec 13 20:07:10 2016 +1300
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 <paul eggleton linux intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
bitbake/lib/bb/command.py | 6 +++++-
bitbake/lib/bb/cooker.py | 9 +++++----
bitbake/lib/bb/tinfoil.py | 4 ++--
3 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index 352838b..3b68c1a 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -549,8 +549,12 @@ class CommandsAsync:
"""
bfile = params[0]
task = params[1]
+ if len(params) > 2:
+ hidewarning = params[2]
+ else:
+ hidewarning = False
- command.cooker.buildFile(bfile, task)
+ command.cooker.buildFile(bfile, task, hidewarning)
buildFile.needcache = False
def buildTargets(self, command, params):
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 48904a5..a4aaac5 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
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py
index 720bf4b..96275fd 100644
--- a/bitbake/lib/bb/tinfoil.py
+++ b/bitbake/lib/bb/tinfoil.py
@@ -366,9 +366,9 @@ class Tinfoil:
def build_file(self, buildfile, task):
"""
Runs the specified task for just a single recipe (i.e. no dependencies).
- This is equivalent to bitbake -b.
+ This is equivalent to bitbake -b, except no warning will be printed.
"""
- return self.run_command('buildFile', buildfile, task)
+ return self.run_command('buildFile', buildfile, task, True)
def shutdown(self):
if self.server_connection:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]