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 | poky-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: | |||
170 | return self.expand(value,var) | 170 | return self.expand(value,var) |
171 | return value | 171 | return value |
172 | 172 | ||
173 | def renameVar(self, key, newkey): | ||
174 | """ | ||
175 | Rename the variable key to newkey | ||
176 | """ | ||
177 | val = self.getVar(key, 0) | ||
178 | if val is None: | ||
179 | return | ||
180 | |||
181 | self.setVar(newkey, val) | ||
182 | |||
183 | for i in ('_append', '_prepend'): | ||
184 | dest = self.getVarFlag(newkey, i) or [] | ||
185 | src = self.getVarFlag(key, i) or [] | ||
186 | dest.extend(src) | ||
187 | self.setVarFlag(newkey, i, dest) | ||
188 | |||
189 | if self._special_values.has_key(i) and key in self._special_values[i]: | ||
190 | self._special_values[i].remove(key) | ||
191 | self._special_values[i].add(newkey) | ||
192 | |||
193 | self.delVar(key) | ||
194 | |||
173 | def delVar(self,var): | 195 | def delVar(self,var): |
174 | self.expand_cache = {} | 196 | self.expand_cache = {} |
175 | self.dict[var] = {} | 197 | self.dict[var] = {} |