]> code.ossystems Code Review - openembedded-core.git/commitdiff
Improve FILESPATH usage in .bbappend recipes
authorRichard Purdie <rpurdie@linux.intel.com>
Tue, 5 Oct 2010 09:06:11 +0000 (10:06 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 5 Oct 2010 21:26:32 +0000 (22:26 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
meta-emenlow/packages/formfactor/formfactor_0.0.bbappend
meta/classes/base.bbclass

index cd5d96eb553deebd4a44f00d96838b4127c0d1ba..9bc9eed5cf4300e7c8ba7f5ee4691c3f1c7b4bd9 100644 (file)
@@ -1,4 +1,3 @@
-THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
-FILESPATH =. "${@base_set_filespath(["${THISDIR}/${PN}"], d)}:"
-
+FILESEXTRAPATHS := "${THISDIR}/${PN}"
 PR = "r26"
index dd346ee8f32051f886c6fa3324e97cc54032187d..a9e5657d863935a6b4c26642629b3e375cb4fd3f 100644 (file)
@@ -106,6 +106,8 @@ DEPENDS_virtclass-nativesdk_prepend="${@base_dep_prepend(d)} "
 
 def base_set_filespath(path, d):
        filespath = []
+       extrapaths = (bb.data.getVar("FILESEXTRAPATHS", d, True) or "").split()
+       path = extrapaths + path
        # The ":" ensures we have an 'empty' override
        overrides = (bb.data.getVar("OVERRIDES", d, 1) or "") + ":"
        for p in path:
@@ -114,6 +116,9 @@ def base_set_filespath(path, d):
        return ":".join(filespath)
 
 FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}"
+# THISDIR only works properly with imediate expansion as it has to run
+# in the context of the location its used (:=)
+THISDIR = "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
 
 SCENEFUNCS += "base_scenefunction"