amend.bbclass: load *all* available amend.inc files in FILESPATH, not the first
authorChris Larson <chris_larson@mentor.com>
Mon, 24 May 2010 03:15:01 +0000 (20:15 -0700)
committerChris Larson <chris_larson@mentor.com>
Mon, 24 May 2010 03:36:49 +0000 (20:36 -0700)
While this deviates from ordinary BBPATH/FILESPATH behavior by bitbake and
OpenEmbedded, amend.inc is a special case.  It's highly unintuitive for
someone to create, say, files/busybox/amend.inc relative to TOPDIR, with
${TOPDIR}/files in FILESPATHBASE, and suddenly things break, because that
amend.inc overrides one in an overlay.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
classes/amend.bbclass

index bcb93d4..cddd28c 100644 (file)
@@ -21,9 +21,7 @@ python () {
     depends = d.getVar("__depends", 0) or []
     d.setVar("__depends", depends + [(file, 0) for file in amendfiles if not os.path.exists(file)])
 
-    existing = (file for file in amendfiles if os.path.exists(file))
-    try:
-        bb.parse.handle(existing.next(), d, 1)
-    except StopIteration:
-        pass
+    for file in amendfiles:
+        if os.path.exists(file):
+            bb.parse.handle(file, d, 1)
 }