diff options
author | Richard Purdie <richard@openedhand.com> | 2007-08-16 09:55:21 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-08-16 09:55:21 +0000 |
commit | 7611768e23d9809f458691454c2aeb60d7b26e7d (patch) | |
tree | 050786d6475e1d0ed219d01dac1f02b1ebbdbb81 /bitbake/lib/bb/data_smart.py | |
parent | 11ce59b501b5c82f6705db4d76e468fcbe3412db (diff) | |
download | openembedded-core-contrib-7611768e23d9809f458691454c2aeb60d7b26e7d.tar.gz |
bitbake: Sync with 1.8 head. Adds locking to the fetcher to prevent parallel downloads, fixes key expansion issues and occasional missing dependency graph links
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2502 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/data_smart.py')
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index ef1e9dda07..e879343f5d 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py @@ -170,6 +170,28 @@ class DataSmart: return self.expand(value,var) return value + def renameVar(self, key, newkey): + """ + Rename the variable key to newkey + """ + val = self.getVar(key, 0) + if val is None: + return + + self.setVar(newkey, val) + + for i in ('_append', '_prepend'): + dest = self.getVarFlag(newkey, i) or [] + src = self.getVarFlag(key, i) or [] + dest.extend(src) + self.setVarFlag(newkey, i, dest) + + if self._special_values.has_key(i) and key in self._special_values[i]: + self._special_values[i].remove(key) + self._special_values[i].add(newkey) + + self.delVar(key) + def delVar(self,var): self.expand_cache = {} self.dict[var] = {} |