diff options
Diffstat (limited to 'bitbake/lib/bb/data_smart.py')
| -rw-r--r-- | bitbake/lib/bb/data_smart.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 1e65014028..48f4016180 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
| @@ -94,7 +94,8 @@ class DataSmart: | |||
| 94 | 94 | ||
| 95 | def finalize(self): | 95 | def finalize(self): |
| 96 | """Performs final steps upon the datastore, including application of overrides""" | 96 | """Performs final steps upon the datastore, including application of overrides""" |
| 97 | overrides = (self.getVar("OVERRIDES", True) or "").split(":") | 97 | |
| 98 | overrides = (self.getVar("OVERRIDES", True) or "").split(":") or [] | ||
| 98 | 99 | ||
| 99 | # | 100 | # |
| 100 | # Well let us see what breaks here. We used to iterate | 101 | # Well let us see what breaks here. We used to iterate |
| @@ -113,7 +114,7 @@ class DataSmart: | |||
| 113 | 114 | ||
| 114 | for o in overrides: | 115 | for o in overrides: |
| 115 | # calculate '_'+override | 116 | # calculate '_'+override |
| 116 | l = len(o)+1 | 117 | l = len(o) + 1 |
| 117 | 118 | ||
| 118 | # see if one should even try | 119 | # see if one should even try |
| 119 | if o not in self._seen_overrides: | 120 | if o not in self._seen_overrides: |
| @@ -123,18 +124,18 @@ class DataSmart: | |||
| 123 | for var in vars: | 124 | for var in vars: |
| 124 | name = var[:-l] | 125 | name = var[:-l] |
| 125 | try: | 126 | try: |
| 126 | self.renameVar(var, name) | 127 | self[name] = self[var] |
| 127 | except Exception: | 128 | except Exception: |
| 128 | bb.msg.note(1, bb.msg.domain.Data, "Untracked delVar") | 129 | bb.msg.note(1, bb.msg.domain.Data, "Untracked delVar") |
| 129 | 130 | ||
| 130 | # now on to the appends and prepends | 131 | # now on to the appends and prepends |
| 131 | if "_append" in self._special_values: | 132 | if "_append" in self._special_values: |
| 132 | appends = self._special_values['_append'] or [] | 133 | appends = self._special_values["_append"] or [] |
| 133 | for append in appends: | 134 | for append in appends: |
| 134 | for (a, o) in self.getVarFlag(append, '_append') or []: | 135 | for (a, o) in self.getVarFlag(append, "_append") or []: |
| 135 | # maybe the OVERRIDE was not yet added so keep the append | 136 | # maybe the OVERRIDE was not yet added so keep the append |
| 136 | if (o and o in overrides) or not o: | 137 | if (o and o in overrides) or not o: |
| 137 | self.delVarFlag(append, '_append') | 138 | self.delVarFlag(append, "_append") |
| 138 | if o and not o in overrides: | 139 | if o and not o in overrides: |
| 139 | continue | 140 | continue |
| 140 | 141 | ||
| @@ -144,13 +145,13 @@ class DataSmart: | |||
| 144 | 145 | ||
| 145 | 146 | ||
| 146 | if "_prepend" in self._special_values: | 147 | if "_prepend" in self._special_values: |
| 147 | prepends = self._special_values['_prepend'] or [] | 148 | prepends = self._special_values["_prepend"] or [] |
| 148 | 149 | ||
| 149 | for prepend in prepends: | 150 | for prepend in prepends: |
| 150 | for (a, o) in self.getVarFlag(prepend, '_prepend') or []: | 151 | for (a, o) in self.getVarFlag(prepend, "_prepend") or []: |
| 151 | # maybe the OVERRIDE was not yet added so keep the prepend | 152 | # maybe the OVERRIDE was not yet added so keep the prepend |
| 152 | if (o and o in overrides) or not o: | 153 | if (o and o in overrides) or not o: |
| 153 | self.delVarFlag(prepend, '_prepend') | 154 | self.delVarFlag(prepend, "_prepend") |
| 154 | if o and not o in overrides: | 155 | if o and not o in overrides: |
| 155 | continue | 156 | continue |
| 156 | 157 | ||
