diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/command.py | 6 | ||||
-rw-r--r-- | bitbake/lib/bb/cooker.py | 9 | ||||
-rw-r--r-- | 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 352838b0aa..3b68c1aaa2 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py | |||
@@ -549,8 +549,12 @@ class CommandsAsync: | |||
549 | """ | 549 | """ |
550 | bfile = params[0] | 550 | bfile = params[0] |
551 | task = params[1] | 551 | task = params[1] |
552 | if len(params) > 2: | ||
553 | hidewarning = params[2] | ||
554 | else: | ||
555 | hidewarning = False | ||
552 | 556 | ||
553 | command.cooker.buildFile(bfile, task) | 557 | command.cooker.buildFile(bfile, task, hidewarning) |
554 | buildFile.needcache = False | 558 | buildFile.needcache = False |
555 | 559 | ||
556 | def buildTargets(self, command, params): | 560 | def buildTargets(self, command, params): |
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: | |||
1334 | raise NoSpecificMatch | 1334 | raise NoSpecificMatch |
1335 | return matches[0] | 1335 | return matches[0] |
1336 | 1336 | ||
1337 | def buildFile(self, buildfile, task): | 1337 | def buildFile(self, buildfile, task, hidewarning=False): |
1338 | """ | 1338 | """ |
1339 | Build the file matching regexp buildfile | 1339 | Build the file matching regexp buildfile |
1340 | """ | 1340 | """ |
1341 | bb.event.fire(bb.event.BuildInit(), self.expanded_data) | 1341 | bb.event.fire(bb.event.BuildInit(), self.expanded_data) |
1342 | 1342 | ||
1343 | # Too many people use -b because they think it's how you normally | 1343 | if not hidewarning: |
1344 | # specify a target to be built, so show a warning | 1344 | # Too many people use -b because they think it's how you normally |
1345 | bb.warn("Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.") | 1345 | # specify a target to be built, so show a warning |
1346 | bb.warn("Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.") | ||
1346 | 1347 | ||
1347 | # Parse the configuration here. We need to do it explicitly here since | 1348 | # Parse the configuration here. We need to do it explicitly here since |
1348 | # buildFile() doesn't use the cache | 1349 | # buildFile() doesn't use the cache |
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index 720bf4b931..96275fde7f 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py | |||
@@ -366,9 +366,9 @@ class Tinfoil: | |||
366 | def build_file(self, buildfile, task): | 366 | def build_file(self, buildfile, task): |
367 | """ | 367 | """ |
368 | Runs the specified task for just a single recipe (i.e. no dependencies). | 368 | Runs the specified task for just a single recipe (i.e. no dependencies). |
369 | This is equivalent to bitbake -b. | 369 | This is equivalent to bitbake -b, except no warning will be printed. |
370 | """ | 370 | """ |
371 | return self.run_command('buildFile', buildfile, task) | 371 | return self.run_command('buildFile', buildfile, task, True) |
372 | 372 | ||
373 | def shutdown(self): | 373 | def shutdown(self): |
374 | if self.server_connection: | 374 | if self.server_connection: |