diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-07-25 22:23:57 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-02 15:44:10 +0100 |
commit | 2abf8a699edd513405befbd1a0eafc8f55d6b514 (patch) | |
tree | 9815707d7cc45e6de4fda8be6ed0e58b0a92ed84 /bitbake | |
parent | f735627e7c5aeb421338db55f3905d74751d4b71 (diff) | |
download | poky-2abf8a699edd513405befbd1a0eafc8f55d6b514.tar.gz |
bitbake: bitbake: Switch to using new override syntax
This change updates the datastore to use the new override syntax using
colons instead of underscores exclusively. It is expected layers would
have to be converted to work with bitbake after this change.
Supporting mixed syntax isn't possible, it is only feasible to have
one internal representation of overrides.
Whilst we can't warn for every possible override that may be set in the
old format, show errors for _append/_prepend/_remove since those should
never be present.
(Bitbake rev: 7dcf317cc141dc980634f8c18bfa84f83e57206a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cache.py | 4 | ||||
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 113 | ||||
-rw-r--r-- | bitbake/lib/bb/parse/ast.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/siggen.py | 4 |
4 files changed, 59 insertions, 64 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index 27eb271798..73bc6e9665 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py | |||
@@ -53,12 +53,12 @@ class RecipeInfoCommon(object): | |||
53 | 53 | ||
54 | @classmethod | 54 | @classmethod |
55 | def pkgvar(cls, var, packages, metadata): | 55 | def pkgvar(cls, var, packages, metadata): |
56 | return dict((pkg, cls.depvar("%s_%s" % (var, pkg), metadata)) | 56 | return dict((pkg, cls.depvar("%s:%s" % (var, pkg), metadata)) |
57 | for pkg in packages) | 57 | for pkg in packages) |
58 | 58 | ||
59 | @classmethod | 59 | @classmethod |
60 | def taskvar(cls, var, tasks, metadata): | 60 | def taskvar(cls, var, tasks, metadata): |
61 | return dict((task, cls.getvar("%s_task-%s" % (var, task), metadata)) | 61 | return dict((task, cls.getvar("%s:task-%s" % (var, task), metadata)) |
62 | for task in tasks) | 62 | for task in tasks) |
63 | 63 | ||
64 | @classmethod | 64 | @classmethod |
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index b4ed62a4e5..43e9e78555 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -26,8 +26,8 @@ from bb.COW import COWDictBase | |||
26 | 26 | ||
27 | logger = logging.getLogger("BitBake.Data") | 27 | logger = logging.getLogger("BitBake.Data") |
28 | 28 | ||
29 | __setvar_keyword__ = ["_append", "_prepend", "_remove"] | 29 | __setvar_keyword__ = [":append", ":prepend", ":remove"] |
30 | __setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>_append|_prepend|_remove)(_(?P<add>[^A-Z]*))?$') | 30 | __setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>:append|:prepend|:remove)(:(?P<add>[^A-Z]*))?$') |
31 | __expand_var_regexp__ = re.compile(r"\${[a-zA-Z0-9\-_+./~:]+?}") | 31 | __expand_var_regexp__ = re.compile(r"\${[a-zA-Z0-9\-_+./~:]+?}") |
32 | __expand_python_regexp__ = re.compile(r"\${@.+?}") | 32 | __expand_python_regexp__ = re.compile(r"\${@.+?}") |
33 | __whitespace_split__ = re.compile(r'(\s)') | 33 | __whitespace_split__ = re.compile(r'(\s)') |
@@ -277,7 +277,7 @@ class VariableHistory(object): | |||
277 | for (r, override) in d.overridedata[var]: | 277 | for (r, override) in d.overridedata[var]: |
278 | for event in self.variable(r): | 278 | for event in self.variable(r): |
279 | loginfo = event.copy() | 279 | loginfo = event.copy() |
280 | if 'flag' in loginfo and not loginfo['flag'].startswith("_"): | 280 | if 'flag' in loginfo and not loginfo['flag'].startswith(("_", ":")): |
281 | continue | 281 | continue |
282 | loginfo['variable'] = var | 282 | loginfo['variable'] = var |
283 | loginfo['op'] = 'override[%s]:%s' % (override, loginfo['op']) | 283 | loginfo['op'] = 'override[%s]:%s' % (override, loginfo['op']) |
@@ -342,7 +342,7 @@ class VariableHistory(object): | |||
342 | for event in history: | 342 | for event in history: |
343 | if 'flag' in event: | 343 | if 'flag' in event: |
344 | continue | 344 | continue |
345 | if event['op'] == '_remove': | 345 | if event['op'] == ':remove': |
346 | continue | 346 | continue |
347 | if isset and event['op'] == 'set?': | 347 | if isset and event['op'] == 'set?': |
348 | continue | 348 | continue |
@@ -481,7 +481,15 @@ class DataSmart(MutableMapping): | |||
481 | 481 | ||
482 | def setVar(self, var, value, **loginfo): | 482 | def setVar(self, var, value, **loginfo): |
483 | #print("var=" + str(var) + " val=" + str(value)) | 483 | #print("var=" + str(var) + " val=" + str(value)) |
484 | var = var.replace(":", "_") | 484 | |
485 | if "_append" in var or "_prepend" in var or "_remove" in var: | ||
486 | info = "%s" % var | ||
487 | if "filename" in loginfo: | ||
488 | info += " file: %s" % loginfo[filename] | ||
489 | if "lineno" in loginfo: | ||
490 | info += " line: %s" % loginfo[lineno] | ||
491 | bb.fatal("Variable %s contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake." % info) | ||
492 | |||
485 | self.expand_cache = {} | 493 | self.expand_cache = {} |
486 | parsing=False | 494 | parsing=False |
487 | if 'parsing' in loginfo: | 495 | if 'parsing' in loginfo: |
@@ -510,7 +518,7 @@ class DataSmart(MutableMapping): | |||
510 | # pay the cookie monster | 518 | # pay the cookie monster |
511 | 519 | ||
512 | # more cookies for the cookie monster | 520 | # more cookies for the cookie monster |
513 | if '_' in var: | 521 | if ':' in var: |
514 | self._setvar_update_overrides(base, **loginfo) | 522 | self._setvar_update_overrides(base, **loginfo) |
515 | 523 | ||
516 | if base in self.overridevars: | 524 | if base in self.overridevars: |
@@ -521,27 +529,27 @@ class DataSmart(MutableMapping): | |||
521 | self._makeShadowCopy(var) | 529 | self._makeShadowCopy(var) |
522 | 530 | ||
523 | if not parsing: | 531 | if not parsing: |
524 | if "_append" in self.dict[var]: | 532 | if ":append" in self.dict[var]: |
525 | del self.dict[var]["_append"] | 533 | del self.dict[var][":append"] |
526 | if "_prepend" in self.dict[var]: | 534 | if ":prepend" in self.dict[var]: |
527 | del self.dict[var]["_prepend"] | 535 | del self.dict[var][":prepend"] |
528 | if "_remove" in self.dict[var]: | 536 | if ":remove" in self.dict[var]: |
529 | del self.dict[var]["_remove"] | 537 | del self.dict[var][":remove"] |
530 | if var in self.overridedata: | 538 | if var in self.overridedata: |
531 | active = [] | 539 | active = [] |
532 | self.need_overrides() | 540 | self.need_overrides() |
533 | for (r, o) in self.overridedata[var]: | 541 | for (r, o) in self.overridedata[var]: |
534 | if o in self.overridesset: | 542 | if o in self.overridesset: |
535 | active.append(r) | 543 | active.append(r) |
536 | elif "_" in o: | 544 | elif ":" in o: |
537 | if set(o.split("_")).issubset(self.overridesset): | 545 | if set(o.split(":")).issubset(self.overridesset): |
538 | active.append(r) | 546 | active.append(r) |
539 | for a in active: | 547 | for a in active: |
540 | self.delVar(a) | 548 | self.delVar(a) |
541 | del self.overridedata[var] | 549 | del self.overridedata[var] |
542 | 550 | ||
543 | # more cookies for the cookie monster | 551 | # more cookies for the cookie monster |
544 | if '_' in var: | 552 | if ':' in var: |
545 | self._setvar_update_overrides(var, **loginfo) | 553 | self._setvar_update_overrides(var, **loginfo) |
546 | 554 | ||
547 | # setting var | 555 | # setting var |
@@ -567,8 +575,8 @@ class DataSmart(MutableMapping): | |||
567 | 575 | ||
568 | def _setvar_update_overrides(self, var, **loginfo): | 576 | def _setvar_update_overrides(self, var, **loginfo): |
569 | # aka pay the cookie monster | 577 | # aka pay the cookie monster |
570 | override = var[var.rfind('_')+1:] | 578 | override = var[var.rfind(':')+1:] |
571 | shortvar = var[:var.rfind('_')] | 579 | shortvar = var[:var.rfind(':')] |
572 | while override and __override_regexp__.match(override): | 580 | while override and __override_regexp__.match(override): |
573 | if shortvar not in self.overridedata: | 581 | if shortvar not in self.overridedata: |
574 | self.overridedata[shortvar] = [] | 582 | self.overridedata[shortvar] = [] |
@@ -577,9 +585,9 @@ class DataSmart(MutableMapping): | |||
577 | self.overridedata[shortvar] = list(self.overridedata[shortvar]) | 585 | self.overridedata[shortvar] = list(self.overridedata[shortvar]) |
578 | self.overridedata[shortvar].append([var, override]) | 586 | self.overridedata[shortvar].append([var, override]) |
579 | override = None | 587 | override = None |
580 | if "_" in shortvar: | 588 | if ":" in shortvar: |
581 | override = var[shortvar.rfind('_')+1:] | 589 | override = var[shortvar.rfind(':')+1:] |
582 | shortvar = var[:shortvar.rfind('_')] | 590 | shortvar = var[:shortvar.rfind(':')] |
583 | if len(shortvar) == 0: | 591 | if len(shortvar) == 0: |
584 | override = None | 592 | override = None |
585 | 593 | ||
@@ -590,8 +598,6 @@ class DataSmart(MutableMapping): | |||
590 | """ | 598 | """ |
591 | Rename the variable key to newkey | 599 | Rename the variable key to newkey |
592 | """ | 600 | """ |
593 | key = key.replace(":", "_") | ||
594 | newkey = newkey.replace(":", "_") | ||
595 | if key == newkey: | 601 | if key == newkey: |
596 | bb.warn("Calling renameVar with equivalent keys (%s) is invalid" % key) | 602 | bb.warn("Calling renameVar with equivalent keys (%s) is invalid" % key) |
597 | return | 603 | return |
@@ -620,7 +626,7 @@ class DataSmart(MutableMapping): | |||
620 | self.overridedata[newkey].append([v.replace(key, newkey), o]) | 626 | self.overridedata[newkey].append([v.replace(key, newkey), o]) |
621 | self.renameVar(v, v.replace(key, newkey)) | 627 | self.renameVar(v, v.replace(key, newkey)) |
622 | 628 | ||
623 | if '_' in newkey and val is None: | 629 | if ':' in newkey and val is None: |
624 | self._setvar_update_overrides(newkey, **loginfo) | 630 | self._setvar_update_overrides(newkey, **loginfo) |
625 | 631 | ||
626 | loginfo['variable'] = key | 632 | loginfo['variable'] = key |
@@ -632,15 +638,14 @@ class DataSmart(MutableMapping): | |||
632 | def appendVar(self, var, value, **loginfo): | 638 | def appendVar(self, var, value, **loginfo): |
633 | loginfo['op'] = 'append' | 639 | loginfo['op'] = 'append' |
634 | self.varhistory.record(**loginfo) | 640 | self.varhistory.record(**loginfo) |
635 | self.setVar(var + "_append", value, ignore=True, parsing=True) | 641 | self.setVar(var + ":append", value, ignore=True, parsing=True) |
636 | 642 | ||
637 | def prependVar(self, var, value, **loginfo): | 643 | def prependVar(self, var, value, **loginfo): |
638 | loginfo['op'] = 'prepend' | 644 | loginfo['op'] = 'prepend' |
639 | self.varhistory.record(**loginfo) | 645 | self.varhistory.record(**loginfo) |
640 | self.setVar(var + "_prepend", value, ignore=True, parsing=True) | 646 | self.setVar(var + ":prepend", value, ignore=True, parsing=True) |
641 | 647 | ||
642 | def delVar(self, var, **loginfo): | 648 | def delVar(self, var, **loginfo): |
643 | var = var.replace(":", "_") | ||
644 | self.expand_cache = {} | 649 | self.expand_cache = {} |
645 | 650 | ||
646 | loginfo['detail'] = "" | 651 | loginfo['detail'] = "" |
@@ -649,9 +654,9 @@ class DataSmart(MutableMapping): | |||
649 | self.dict[var] = {} | 654 | self.dict[var] = {} |
650 | if var in self.overridedata: | 655 | if var in self.overridedata: |
651 | del self.overridedata[var] | 656 | del self.overridedata[var] |
652 | if '_' in var: | 657 | if ':' in var: |
653 | override = var[var.rfind('_')+1:] | 658 | override = var[var.rfind(':')+1:] |
654 | shortvar = var[:var.rfind('_')] | 659 | shortvar = var[:var.rfind(':')] |
655 | while override and override.islower(): | 660 | while override and override.islower(): |
656 | try: | 661 | try: |
657 | if shortvar in self.overridedata: | 662 | if shortvar in self.overridedata: |
@@ -661,14 +666,13 @@ class DataSmart(MutableMapping): | |||
661 | except ValueError as e: | 666 | except ValueError as e: |
662 | pass | 667 | pass |
663 | override = None | 668 | override = None |
664 | if "_" in shortvar: | 669 | if ":" in shortvar: |
665 | override = var[shortvar.rfind('_')+1:] | 670 | override = var[shortvar.rfind(':')+1:] |
666 | shortvar = var[:shortvar.rfind('_')] | 671 | shortvar = var[:shortvar.rfind(':')] |
667 | if len(shortvar) == 0: | 672 | if len(shortvar) == 0: |
668 | override = None | 673 | override = None |
669 | 674 | ||
670 | def setVarFlag(self, var, flag, value, **loginfo): | 675 | def setVarFlag(self, var, flag, value, **loginfo): |
671 | var = var.replace(":", "_") | ||
672 | self.expand_cache = {} | 676 | self.expand_cache = {} |
673 | 677 | ||
674 | if 'op' not in loginfo: | 678 | if 'op' not in loginfo: |
@@ -679,7 +683,7 @@ class DataSmart(MutableMapping): | |||
679 | self._makeShadowCopy(var) | 683 | self._makeShadowCopy(var) |
680 | self.dict[var][flag] = value | 684 | self.dict[var][flag] = value |
681 | 685 | ||
682 | if flag == "_defaultval" and '_' in var: | 686 | if flag == "_defaultval" and ':' in var: |
683 | self._setvar_update_overrides(var, **loginfo) | 687 | self._setvar_update_overrides(var, **loginfo) |
684 | if flag == "_defaultval" and var in self.overridevars: | 688 | if flag == "_defaultval" and var in self.overridevars: |
685 | self._setvar_update_overridevars(var, value) | 689 | self._setvar_update_overridevars(var, value) |
@@ -692,7 +696,6 @@ class DataSmart(MutableMapping): | |||
692 | self.dict["__exportlist"]["_content"].add(var) | 696 | self.dict["__exportlist"]["_content"].add(var) |
693 | 697 | ||
694 | def getVarFlag(self, var, flag, expand=True, noweakdefault=False, parsing=False, retparser=False): | 698 | def getVarFlag(self, var, flag, expand=True, noweakdefault=False, parsing=False, retparser=False): |
695 | var = var.replace(":", "_") | ||
696 | if flag == "_content": | 699 | if flag == "_content": |
697 | cachename = var | 700 | cachename = var |
698 | else: | 701 | else: |
@@ -712,11 +715,11 @@ class DataSmart(MutableMapping): | |||
712 | active = {} | 715 | active = {} |
713 | self.need_overrides() | 716 | self.need_overrides() |
714 | for (r, o) in overridedata: | 717 | for (r, o) in overridedata: |
715 | # What about double overrides both with "_" in the name? | 718 | # FIXME What about double overrides both with "_" in the name? |
716 | if o in self.overridesset: | 719 | if o in self.overridesset: |
717 | active[o] = r | 720 | active[o] = r |
718 | elif "_" in o: | 721 | elif ":" in o: |
719 | if set(o.split("_")).issubset(self.overridesset): | 722 | if set(o.split(":")).issubset(self.overridesset): |
720 | active[o] = r | 723 | active[o] = r |
721 | 724 | ||
722 | mod = True | 725 | mod = True |
@@ -724,10 +727,10 @@ class DataSmart(MutableMapping): | |||
724 | mod = False | 727 | mod = False |
725 | for o in self.overrides: | 728 | for o in self.overrides: |
726 | for a in active.copy(): | 729 | for a in active.copy(): |
727 | if a.endswith("_" + o): | 730 | if a.endswith(":" + o): |
728 | t = active[a] | 731 | t = active[a] |
729 | del active[a] | 732 | del active[a] |
730 | active[a.replace("_" + o, "")] = t | 733 | active[a.replace(":" + o, "")] = t |
731 | mod = True | 734 | mod = True |
732 | elif a == o: | 735 | elif a == o: |
733 | match = active[a] | 736 | match = active[a] |
@@ -746,28 +749,28 @@ class DataSmart(MutableMapping): | |||
746 | value = copy.copy(local_var["_defaultval"]) | 749 | value = copy.copy(local_var["_defaultval"]) |
747 | 750 | ||
748 | 751 | ||
749 | if flag == "_content" and local_var is not None and "_append" in local_var and not parsing: | 752 | if flag == "_content" and local_var is not None and ":append" in local_var and not parsing: |
750 | if not value: | 753 | if not value: |
751 | value = "" | 754 | value = "" |
752 | self.need_overrides() | 755 | self.need_overrides() |
753 | for (r, o) in local_var["_append"]: | 756 | for (r, o) in local_var[":append"]: |
754 | match = True | 757 | match = True |
755 | if o: | 758 | if o: |
756 | for o2 in o.split("_"): | 759 | for o2 in o.split(":"): |
757 | if not o2 in self.overrides: | 760 | if not o2 in self.overrides: |
758 | match = False | 761 | match = False |
759 | if match: | 762 | if match: |
760 | value = value + r | 763 | value = value + r |
761 | 764 | ||
762 | if flag == "_content" and local_var is not None and "_prepend" in local_var and not parsing: | 765 | if flag == "_content" and local_var is not None and ":prepend" in local_var and not parsing: |
763 | if not value: | 766 | if not value: |
764 | value = "" | 767 | value = "" |
765 | self.need_overrides() | 768 | self.need_overrides() |
766 | for (r, o) in local_var["_prepend"]: | 769 | for (r, o) in local_var[":prepend"]: |
767 | 770 | ||
768 | match = True | 771 | match = True |
769 | if o: | 772 | if o: |
770 | for o2 in o.split("_"): | 773 | for o2 in o.split(":"): |
771 | if not o2 in self.overrides: | 774 | if not o2 in self.overrides: |
772 | match = False | 775 | match = False |
773 | if match: | 776 | if match: |
@@ -779,12 +782,12 @@ class DataSmart(MutableMapping): | |||
779 | if expand: | 782 | if expand: |
780 | value = parser.value | 783 | value = parser.value |
781 | 784 | ||
782 | if value and flag == "_content" and local_var is not None and "_remove" in local_var and not parsing: | 785 | if value and flag == "_content" and local_var is not None and ":remove" in local_var and not parsing: |
783 | self.need_overrides() | 786 | self.need_overrides() |
784 | for (r, o) in local_var["_remove"]: | 787 | for (r, o) in local_var[":remove"]: |
785 | match = True | 788 | match = True |
786 | if o: | 789 | if o: |
787 | for o2 in o.split("_"): | 790 | for o2 in o.split(":"): |
788 | if not o2 in self.overrides: | 791 | if not o2 in self.overrides: |
789 | match = False | 792 | match = False |
790 | if match: | 793 | if match: |
@@ -820,7 +823,6 @@ class DataSmart(MutableMapping): | |||
820 | return value | 823 | return value |
821 | 824 | ||
822 | def delVarFlag(self, var, flag, **loginfo): | 825 | def delVarFlag(self, var, flag, **loginfo): |
823 | var = var.replace(":", "_") | ||
824 | self.expand_cache = {} | 826 | self.expand_cache = {} |
825 | 827 | ||
826 | local_var, _ = self._findVar(var) | 828 | local_var, _ = self._findVar(var) |
@@ -838,7 +840,6 @@ class DataSmart(MutableMapping): | |||
838 | del self.dict[var][flag] | 840 | del self.dict[var][flag] |
839 | 841 | ||
840 | def appendVarFlag(self, var, flag, value, **loginfo): | 842 | def appendVarFlag(self, var, flag, value, **loginfo): |
841 | var = var.replace(":", "_") | ||
842 | loginfo['op'] = 'append' | 843 | loginfo['op'] = 'append' |
843 | loginfo['flag'] = flag | 844 | loginfo['flag'] = flag |
844 | self.varhistory.record(**loginfo) | 845 | self.varhistory.record(**loginfo) |
@@ -846,7 +847,6 @@ class DataSmart(MutableMapping): | |||
846 | self.setVarFlag(var, flag, newvalue, ignore=True) | 847 | self.setVarFlag(var, flag, newvalue, ignore=True) |
847 | 848 | ||
848 | def prependVarFlag(self, var, flag, value, **loginfo): | 849 | def prependVarFlag(self, var, flag, value, **loginfo): |
849 | var = var.replace(":", "_") | ||
850 | loginfo['op'] = 'prepend' | 850 | loginfo['op'] = 'prepend' |
851 | loginfo['flag'] = flag | 851 | loginfo['flag'] = flag |
852 | self.varhistory.record(**loginfo) | 852 | self.varhistory.record(**loginfo) |
@@ -854,7 +854,6 @@ class DataSmart(MutableMapping): | |||
854 | self.setVarFlag(var, flag, newvalue, ignore=True) | 854 | self.setVarFlag(var, flag, newvalue, ignore=True) |
855 | 855 | ||
856 | def setVarFlags(self, var, flags, **loginfo): | 856 | def setVarFlags(self, var, flags, **loginfo): |
857 | var = var.replace(":", "_") | ||
858 | self.expand_cache = {} | 857 | self.expand_cache = {} |
859 | infer_caller_details(loginfo) | 858 | infer_caller_details(loginfo) |
860 | if not var in self.dict: | 859 | if not var in self.dict: |
@@ -869,13 +868,12 @@ class DataSmart(MutableMapping): | |||
869 | self.dict[var][i] = flags[i] | 868 | self.dict[var][i] = flags[i] |
870 | 869 | ||
871 | def getVarFlags(self, var, expand = False, internalflags=False): | 870 | def getVarFlags(self, var, expand = False, internalflags=False): |
872 | var = var.replace(":", "_") | ||
873 | local_var, _ = self._findVar(var) | 871 | local_var, _ = self._findVar(var) |
874 | flags = {} | 872 | flags = {} |
875 | 873 | ||
876 | if local_var: | 874 | if local_var: |
877 | for i in local_var: | 875 | for i in local_var: |
878 | if i.startswith("_") and not internalflags: | 876 | if i.startswith(("_", ":")) and not internalflags: |
879 | continue | 877 | continue |
880 | flags[i] = local_var[i] | 878 | flags[i] = local_var[i] |
881 | if expand and i in expand: | 879 | if expand and i in expand: |
@@ -886,7 +884,6 @@ class DataSmart(MutableMapping): | |||
886 | 884 | ||
887 | 885 | ||
888 | def delVarFlags(self, var, **loginfo): | 886 | def delVarFlags(self, var, **loginfo): |
889 | var = var.replace(":", "_") | ||
890 | self.expand_cache = {} | 887 | self.expand_cache = {} |
891 | if not var in self.dict: | 888 | if not var in self.dict: |
892 | self._makeShadowCopy(var) | 889 | self._makeShadowCopy(var) |
@@ -974,8 +971,8 @@ class DataSmart(MutableMapping): | |||
974 | for (r, o) in self.overridedata[var]: | 971 | for (r, o) in self.overridedata[var]: |
975 | if o in self.overridesset: | 972 | if o in self.overridesset: |
976 | overrides.add(var) | 973 | overrides.add(var) |
977 | elif "_" in o: | 974 | elif ":" in o: |
978 | if set(o.split("_")).issubset(self.overridesset): | 975 | if set(o.split(":")).issubset(self.overridesset): |
979 | overrides.add(var) | 976 | overrides.add(var) |
980 | 977 | ||
981 | for k in keylist(self.dict): | 978 | for k in keylist(self.dict): |
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index 977ba375bf..743ea0dfc0 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py | |||
@@ -97,7 +97,6 @@ class DataNode(AstNode): | |||
97 | def eval(self, data): | 97 | def eval(self, data): |
98 | groupd = self.groupd | 98 | groupd = self.groupd |
99 | key = groupd["var"] | 99 | key = groupd["var"] |
100 | key = key.replace(":", "_") | ||
101 | loginfo = { | 100 | loginfo = { |
102 | 'variable': key, | 101 | 'variable': key, |
103 | 'file': self.filename, | 102 | 'file': self.filename, |
@@ -208,7 +207,6 @@ class ExportFuncsNode(AstNode): | |||
208 | def eval(self, data): | 207 | def eval(self, data): |
209 | 208 | ||
210 | for func in self.n: | 209 | for func in self.n: |
211 | func = func.replace(":", "_") | ||
212 | calledfunc = self.classname + "_" + func | 210 | calledfunc = self.classname + "_" + func |
213 | 211 | ||
214 | if data.getVar(func, False) and not data.getVarFlag(func, 'export_func', False): | 212 | if data.getVar(func, False) and not data.getVarFlag(func, 'export_func', False): |
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py index 07692e673c..3f9fe50642 100644 --- a/bitbake/lib/bb/siggen.py +++ b/bitbake/lib/bb/siggen.py | |||
@@ -228,7 +228,7 @@ class SignatureGeneratorBasic(SignatureGenerator): | |||
228 | # self.dump_sigtask(fn, task, d.getVar("STAMP"), False) | 228 | # self.dump_sigtask(fn, task, d.getVar("STAMP"), False) |
229 | 229 | ||
230 | for task in taskdeps: | 230 | for task in taskdeps: |
231 | d.setVar("BB_BASEHASH_task-%s" % task, self.basehash[fn + ":" + task]) | 231 | d.setVar("BB_BASEHASH:task-%s" % task, self.basehash[fn + ":" + task]) |
232 | 232 | ||
233 | def postparsing_clean_cache(self): | 233 | def postparsing_clean_cache(self): |
234 | # | 234 | # |
@@ -325,7 +325,7 @@ class SignatureGeneratorBasic(SignatureGenerator): | |||
325 | 325 | ||
326 | h = hashlib.sha256(data.encode("utf-8")).hexdigest() | 326 | h = hashlib.sha256(data.encode("utf-8")).hexdigest() |
327 | self.taskhash[tid] = h | 327 | self.taskhash[tid] = h |
328 | #d.setVar("BB_TASKHASH_task-%s" % task, taskhash[task]) | 328 | #d.setVar("BB_TASKHASH:task-%s" % task, taskhash[task]) |
329 | return h | 329 | return h |
330 | 330 | ||
331 | def writeout_file_checksum_cache(self): | 331 | def writeout_file_checksum_cache(self): |