[oe-commits] Chris Larson : amend.bbclass: kill override specific

git version control git at git.openembedded.org
Mon Sep 27 17:03:50 UTC 2010


Module: openembedded.git
Branch: master
Commit: 25a0253a1f2d5240ad6e1992fd812fd52958c523
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=25a0253a1f2d5240ad6e1992fd812fd52958c523

Author: Chris Larson <chris_larson at mentor.com>
Date:   Mon Sep 27 10:01:49 2010 -0700

amend.bbclass: kill override specific

Signed-off-by: Chris Larson <chris_larson at mentor.com>

---

 classes/amend.bbclass |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/classes/amend.bbclass b/classes/amend.bbclass
index 2d92828..a03de64 100644
--- a/classes/amend.bbclass
+++ b/classes/amend.bbclass
@@ -10,23 +10,23 @@
 python () {
     import bb, os
 
-    filespath = d.getVar("FILESPATH", 1).split(":")
-    amendfiles = [os.path.join(fpath, "amend.inc")
-                  for fpath in filespath]
-
-    newdata = []
     seen = set()
-    for file in amendfiles:
-        if file in seen:
-            continue
-        seen.add(file)
+    def __amendfiles():
+        for base in d.getVar("FILESPATHBASE", True).split(":"):
+            for pkg in d.getVar("FILESPATHPKG", True).split(":"):
+                path = os.path.join(base, pkg, "amend.inc")
+                if path not in seen:
+                    seen.add(path)
+                    yield path
 
-        if os.path.exists(file):
-            bb.parse.handle(file, d, 1)
+    newdata = []
+    for amend in __amendfiles():
+        if os.path.exists(amend):
+            bb.parse.handle(amend, d, 1)
         else:
-            # Manually add amend.inc files that don't exist to the __depends, to
-            # ensure that creating them invalidates the bitbake cache for that recipe.
-            newdata.append((file, 0))
+            # Manually add amend.inc files that don't exist to the __depends,
+            # to ensure that creating them invalidates the bitbake cache
+            newdata.append((amend, 0))
 
     if not newdata:
         return





More information about the Openembedded-commits mailing list