summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-01-02 10:15:45 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-01-02 10:15:45 +0000
commit94c895aad5ad286f172b04bc33ba670220d5eba8 (patch)
tree690012ac8e962b7f7b85ac5bda2a23154e098f81 /meta/classes/base.bbclass
parentfe0e39d0ee5373404f4c7af9c1509af7b52a1804 (diff)
downloadpoky-94c895aad5ad286f172b04bc33ba670220d5eba8.tar.gz
bitbake.conf: Create BPN variable containing the pruned version of PN with various suffixes removed and use this for S and FILESPATH. This uses naming from OE but with improved code
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass10
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 76b21382f5..404c319d04 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -167,6 +167,14 @@ def base_both_contain(variable1, variable2, checkvalue, d):
167 167
168DEPENDS_prepend="${@base_dep_prepend(d)} " 168DEPENDS_prepend="${@base_dep_prepend(d)} "
169 169
170def base_prune_suffix(var, suffixes, d):
171 # See if var ends with any of the suffixes listed and
172 # remove it if found
173 for suffix in suffixes:
174 if var.endswith(suffix):
175 return var.replace(suffix, "")
176 return var
177
170def base_set_filespath(path, d): 178def base_set_filespath(path, d):
171 import os, bb 179 import os, bb
172 filespath = [] 180 filespath = []
@@ -177,7 +185,7 @@ def base_set_filespath(path, d):
177 filespath.append(os.path.join(p, o)) 185 filespath.append(os.path.join(p, o))
178 return ":".join(filespath) 186 return ":".join(filespath)
179 187
180FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}" 188FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}"
181 189
182def oe_filter(f, str, d): 190def oe_filter(f, str, d):
183 from re import match 191 from re import match