]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake/cooker.py: Ensure BBFILES is processed in order
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 27 May 2011 14:13:54 +0000 (15:13 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 27 May 2011 16:24:05 +0000 (17:24 +0100)
The files found by collect_bbfiles should be processed in order but due
to being processed using python's set(), the order was not being preserved.

Use a list instead as whilst the code is slightly more ugly, order
is preserved.

Addresses [YOCTO #1100]

Acked-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cooker.py

index 415e1f3011ae4868b3acf543099e18dd2d67b61a..43b36adcdebc187351ae1ac2fd196e6f6c762091 100644 (file)
@@ -944,16 +944,21 @@ class BBCooker:
             collectlog.error("no recipe files to build, check your BBPATH and BBFILES?")
             bb.event.fire(CookerExit(), self.configuration.event_data)
 
-        newfiles = set()
+        # Can't use set here as order is important
+        newfiles = []
         for f in files:
             if os.path.isdir(f):
                 dirfiles = self.find_bbfiles(f)
-                newfiles.update(dirfiles)
+                for g in dirfiles:
+                    if g not in newfiles:
+                        newfiles.append(g)
             else:
                 globbed = glob.glob(f)
                 if not globbed and os.path.exists(f):
                     globbed = [f]
-                newfiles.update(globbed)
+                for g in globbed:
+                    if g not in newfiles:
+                        newfiles.append(g)
 
         bbmask = bb.data.getVar('BBMASK', self.configuration.data, 1)