diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-02 23:49:09 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-04 23:47:49 +0000 |
commit | 4628fe12e7f2767d243949197c8326e3b7396301 (patch) | |
tree | f65671f46417a7fc5710edec657e22917c2b5f30 /bitbake/lib/bb/build.py | |
parent | b98866d003eb1287909ea74d594cdd12f28466f2 (diff) | |
download | poky-4628fe12e7f2767d243949197c8326e3b7396301.tar.gz |
bitbake: lib/bb: Add expansion parameter to getVarFlag
This sets the scene for removing the default False for expansion from
getVarFlag. This would later allow True to become the expand default.
On the most part this is an automatic translation with:
sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, False):g' -i `grep -ril getVar *`
There should be no functional change from this patch.
(Bitbake rev: 7c3b99c6a716095af3ffce0b15110e91fb49c913)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r-- | bitbake/lib/bb/build.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 4a48a61fab..f16675bded 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -318,7 +318,7 @@ exit $ret | |||
318 | os.chmod(runfile, 0775) | 318 | os.chmod(runfile, 0775) |
319 | 319 | ||
320 | cmd = runfile | 320 | cmd = runfile |
321 | if d.getVarFlag(func, 'fakeroot'): | 321 | if d.getVarFlag(func, 'fakeroot', False): |
322 | fakerootcmd = d.getVar('FAKEROOT', True) | 322 | fakerootcmd = d.getVar('FAKEROOT', True) |
323 | if fakerootcmd: | 323 | if fakerootcmd: |
324 | cmd = [fakerootcmd, runfile] | 324 | cmd = [fakerootcmd, runfile] |
@@ -393,7 +393,7 @@ def _exec_task(fn, task, d, quieterr): | |||
393 | Execution of a task involves a bit more setup than executing a function, | 393 | Execution of a task involves a bit more setup than executing a function, |
394 | running it with its own local metadata, and with some useful variables set. | 394 | running it with its own local metadata, and with some useful variables set. |
395 | """ | 395 | """ |
396 | if not d.getVarFlag(task, 'task'): | 396 | if not d.getVarFlag(task, 'task', False): |
397 | event.fire(TaskInvalid(task, d), d) | 397 | event.fire(TaskInvalid(task, d), d) |
398 | logger.error("No such task: %s" % task) | 398 | logger.error("No such task: %s" % task) |
399 | return 1 | 399 | return 1 |
@@ -532,7 +532,7 @@ def _exec_task(fn, task, d, quieterr): | |||
532 | bb.utils.remove(loglink) | 532 | bb.utils.remove(loglink) |
533 | event.fire(TaskSucceeded(task, logfn, localdata), localdata) | 533 | event.fire(TaskSucceeded(task, logfn, localdata), localdata) |
534 | 534 | ||
535 | if not localdata.getVarFlag(task, 'nostamp') and not localdata.getVarFlag(task, 'selfstamp'): | 535 | if not localdata.getVarFlag(task, 'nostamp', False) and not localdata.getVarFlag(task, 'selfstamp', False): |
536 | make_stamp(task, localdata) | 536 | make_stamp(task, localdata) |
537 | 537 | ||
538 | return 0 | 538 | return 0 |
@@ -540,7 +540,7 @@ def _exec_task(fn, task, d, quieterr): | |||
540 | def exec_task(fn, task, d, profile = False): | 540 | def exec_task(fn, task, d, profile = False): |
541 | try: | 541 | try: |
542 | quieterr = False | 542 | quieterr = False |
543 | if d.getVarFlag(task, "quieterrors") is not None: | 543 | if d.getVarFlag(task, "quieterrors", False) is not None: |
544 | quieterr = True | 544 | quieterr = True |
545 | 545 | ||
546 | if profile: | 546 | if profile: |
@@ -745,7 +745,7 @@ def addtask(task, before, after, d): | |||
745 | bbtasks.append(task) | 745 | bbtasks.append(task) |
746 | d.setVar('__BBTASKS', bbtasks) | 746 | d.setVar('__BBTASKS', bbtasks) |
747 | 747 | ||
748 | existing = d.getVarFlag(task, "deps") or [] | 748 | existing = d.getVarFlag(task, "deps", False) or [] |
749 | if after is not None: | 749 | if after is not None: |
750 | # set up deps for function | 750 | # set up deps for function |
751 | for entry in after.split(): | 751 | for entry in after.split(): |
@@ -755,7 +755,7 @@ def addtask(task, before, after, d): | |||
755 | if before is not None: | 755 | if before is not None: |
756 | # set up things that depend on this func | 756 | # set up things that depend on this func |
757 | for entry in before.split(): | 757 | for entry in before.split(): |
758 | existing = d.getVarFlag(entry, "deps") or [] | 758 | existing = d.getVarFlag(entry, "deps", False) or [] |
759 | if task not in existing: | 759 | if task not in existing: |
760 | d.setVarFlag(entry, "deps", [task] + existing) | 760 | d.setVarFlag(entry, "deps", [task] + existing) |
761 | 761 | ||
@@ -770,7 +770,7 @@ def deltask(task, d): | |||
770 | 770 | ||
771 | d.delVarFlag(task, 'deps') | 771 | d.delVarFlag(task, 'deps') |
772 | for bbtask in d.getVar('__BBTASKS', False) or []: | 772 | for bbtask in d.getVar('__BBTASKS', False) or []: |
773 | deps = d.getVarFlag(bbtask, 'deps') or [] | 773 | deps = d.getVarFlag(bbtask, 'deps', False) or [] |
774 | if task in deps: | 774 | if task in deps: |
775 | deps.remove(task) | 775 | deps.remove(task) |
776 | d.setVarFlag(bbtask, 'deps', deps) | 776 | d.setVarFlag(bbtask, 'deps', deps) |