Skip to contentSkip to conversation

data_smart: Use deepcopy for overridedata

PATCH New Richard Purdie 1 participant 1 message Jul 21, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 data_smart: Use deepcopy for overridedata

dbus sets RDEPENDS_dbus-ptest_class-target = "X". nativesdk as BBCLASSEXTEND was expanding and setting various RDEPENDS variables which were clearing overrides queued against RDEPENDS. The problem was that this was leaking into other data contexts such as the target case. This was because overridedata was a shallow copy.

Replacing the shallow copy with a deep copy avoids this problem of leakage between the data stores at a small performance penalty.

bitbake/lib/bb/data_smart.py +1 -1
index dcf082d..86cdeb5 100644
@@ -806,7 +806,7 @@ class DataSmart(MutableMapping):
 
         data.overrides = None
         data.overridevars = copy.copy(self.overridevars)
-        data.overridedata = copy.copy(self.overridedata)
+        data.overridedata = copy.deepcopy(self.overridedata)
 
         return data