"""
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):
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
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: