Lets rename conf/amend-recipes.inc to amend.bbclass, for consistency
authorChris Larson <clarson@mvista.com>
Fri, 22 Jan 2010 17:00:20 +0000 (10:00 -0700)
committerChris Larson <clarson@mvista.com>
Fri, 22 Jan 2010 17:00:20 +0000 (10:00 -0700)
Signed-off-by: Chris Larson <clarson@mvista.com>
classes/amend.bbclass [new file with mode: 0644]
conf/amend-recipes.inc [deleted file]

diff --git a/classes/amend.bbclass b/classes/amend.bbclass
new file mode 100644 (file)
index 0000000..bcb93d4
--- /dev/null
@@ -0,0 +1,29 @@
+# Allows tweaks to be amended to a recipe via a .inc in its FILESPATH
+#
+# Simply drop amend.inc into an appropriate place in a recipe's FILESPATH and
+# it'll be parsed in after the recipe itself is.
+#
+# Copyright (c) 2009 MontaVista Software, Inc.  All rights reserved.
+#
+# Released under the MIT license (see LICENSE.MIT for the terms)
+
+python () {
+    import bb, os
+
+    filespath = d.getVar("FILESPATH", 1).split(":")
+    amendfiles = [os.path.join(fpath, "amend.inc")
+                  for fpath in filespath]
+
+    # Adding all amend.incs that can exist to the __depends, to ensure that
+    # creating one of them invalidates the bitbake cache.  Note that it
+    # requires a fix in bitbake.  Without the bitbake fix, the cache will be
+    # completely invalidated on every bitbake execution.
+    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
+}
diff --git a/conf/amend-recipes.inc b/conf/amend-recipes.inc
deleted file mode 100644 (file)
index bcb93d4..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# Allows tweaks to be amended to a recipe via a .inc in its FILESPATH
-#
-# Simply drop amend.inc into an appropriate place in a recipe's FILESPATH and
-# it'll be parsed in after the recipe itself is.
-#
-# Copyright (c) 2009 MontaVista Software, Inc.  All rights reserved.
-#
-# Released under the MIT license (see LICENSE.MIT for the terms)
-
-python () {
-    import bb, os
-
-    filespath = d.getVar("FILESPATH", 1).split(":")
-    amendfiles = [os.path.join(fpath, "amend.inc")
-                  for fpath in filespath]
-
-    # Adding all amend.incs that can exist to the __depends, to ensure that
-    # creating one of them invalidates the bitbake cache.  Note that it
-    # requires a fix in bitbake.  Without the bitbake fix, the cache will be
-    # completely invalidated on every bitbake execution.
-    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
-}