bb/__init.py: Sort digraph output to make builds more reproducible
authorRichard Purdie <rpurdie@linux.intel.com>
Fri, 17 Aug 2007 23:31:37 +0000 (23:31 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 17 Aug 2007 23:31:37 +0000 (23:31 +0000)
ChangeLog
lib/bb/__init__.py

index 165d947..37f5017 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,8 @@ Changes in Bitbake 1.8.x:
        - Expand data in addtasks
        - Print the list of missing DEPENDS,RDEPENDS for the "No buildable providers available for required...."
          error message.
+       - Rework add_task to be more efficient (6% speedup, 7% number of function calls reduction)
+       - Sort digraph output to make builds more reproducible
        
 
 Changes in Bitbake 1.8.6:
index 585eec8..c2f2f7d 100644 (file)
@@ -1124,7 +1124,12 @@ class digraph:
 
     def allnodes(self):
         "returns all nodes in the dictionary"
-        return self.dict.keys()
+        keys = self.dict.keys()
+        ret = []
+        for key in keys:
+            ret.append(key)
+        ret.sort()
+        return ret
 
     def firstzero(self):
         "returns first node with zero references, or NULL if no such node exists"
@@ -1168,7 +1173,12 @@ class digraph:
     def getparents(self, item):
         if not self.hasnode(item):
             return []
-        return self.dict[item][1]
+        parents = self.dict[item][1]
+        ret = []
+        for parent in parents:
+            ret.append(parent)
+        ret.sort()
+        return ret
 
     def getchildren(self, item):
         if not self.hasnode(item):