diff options
| -rw-r--r-- | bitbake/lib/bb/data_smart.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 7b09af5cf1..4434142a02 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
| @@ -267,6 +267,16 @@ class VariableHistory(object): | |||
| 267 | return | 267 | return |
| 268 | self.variables[var].append(loginfo.copy()) | 268 | self.variables[var].append(loginfo.copy()) |
| 269 | 269 | ||
| 270 | def rename_variable_hist(self, oldvar, newvar): | ||
| 271 | if not self.dataroot._tracking: | ||
| 272 | return | ||
| 273 | if oldvar not in self.variables: | ||
| 274 | return | ||
| 275 | if newvar not in self.variables: | ||
| 276 | self.variables[newvar] = [] | ||
| 277 | for i in self.variables[oldvar]: | ||
| 278 | self.variables[newvar].append(i.copy()) | ||
| 279 | |||
| 270 | def variable(self, var): | 280 | def variable(self, var): |
| 271 | remote_connector = self.dataroot.getVar('_remote_data', False) | 281 | remote_connector = self.dataroot.getVar('_remote_data', False) |
| 272 | if remote_connector: | 282 | if remote_connector: |
| @@ -619,6 +629,7 @@ class DataSmart(MutableMapping): | |||
| 619 | 629 | ||
| 620 | val = self.getVar(key, 0, parsing=True) | 630 | val = self.getVar(key, 0, parsing=True) |
| 621 | if val is not None: | 631 | if val is not None: |
| 632 | self.varhistory.rename_variable_hist(key, newkey) | ||
| 622 | loginfo['variable'] = newkey | 633 | loginfo['variable'] = newkey |
| 623 | loginfo['op'] = 'rename from %s' % key | 634 | loginfo['op'] = 'rename from %s' % key |
| 624 | loginfo['detail'] = val | 635 | loginfo['detail'] = val |
