lib/bb/data_smart.py:
authorHolger Hans Peter Freyther <zecke@selfish.org>
Sat, 15 Apr 2006 22:57:52 +0000 (22:57 +0000)
committerHolger Hans Peter Freyther <zecke@selfish.org>
Sat, 15 Apr 2006 22:57:52 +0000 (22:57 +0000)
    For now we are forced to deepcopy these two dictonaries. This is
    a first aid band aid to have something working.
    We will kill the DataSmartPackage class completely

lib/bb/data_smart.py

index 4d426f4..ca1e3a2 100644 (file)
@@ -236,8 +236,8 @@ class DataSmart:
         # we really want this to be a DataSmart...
         data = DataSmart()
         data.dict["_data"] = self.dict
-        data._seen_overrides = copy.copy(self._seen_overrides)
-        data._special_values = copy.copy(self._special_values)
+        data._seen_overrides = copy.deepcopy(self._seen_overrides)
+        data._special_values = copy.deepcopy(self._special_values)
 
         return data
 
@@ -291,6 +291,11 @@ class DataSmartPackage(DataSmart):
         self.bbfile = os.path.abspath( name )
         self.parent = parent
 
-        # Do Copy on Write
+
+
+        # XXX Kill this class, kill this deepcopy by COW
+        self._seen_overrides = copy.deepcopy(parent._seen_overrides)
+        self._special_values = copy.deepcopy(parent._special_values)
+
         self.linkDataSet()