summaryrefslogtreecommitdiff
path: root/classes/base.bbclass
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-10-22 17:57:15 +0200
committerKoen Kooi <koen@openembedded.org>2008-10-22 17:57:15 +0200
commit6fe9490eac7366d9da691d4129b8d2d23f19a139 (patch)
tree46a8cdc9a72a8c414a7824225bd76ec8c241fbdb /classes/base.bbclass
parent3836ac00385216dd47d89ec3cebc12e5446feef9 (diff)
parentca7e39e27802da8aecf68d74166ec0d2117c8c70 (diff)
Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into org.openembedded.dev
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r--classes/base.bbclass19
1 files changed, 18 insertions, 1 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index b50bc8667c..93a76aa30f 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -157,6 +157,23 @@ def base_both_contain(variable1, variable2, checkvalue, d):
DEPENDS_prepend="${@base_dep_prepend(d)} "
+# Returns PN with various suffixes removed
+# or PN if no matching suffix was found.
+def base_package_name(d):
+ import bb;
+
+ pn = bb.data.getVar('PN', d, 1)
+ if pn.endswith("-native"):
+ pn = pn[0:-7]
+ elif pn.endswith("-cross"):
+ pn = pn[0:-6]
+ elif pn.endswith("-initial"):
+ pn = pn[0:-8]
+ elif pn.endswith("-intermediate"):
+ pn = pn[0:-13]
+
+ return pn
+
def base_set_filespath(path, d):
import os, bb
filespath = []
@@ -167,7 +184,7 @@ def base_set_filespath(path, d):
filespath.append(os.path.join(p, o))
return ":".join(filespath)
-FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}"
+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)}"
def oe_filter(f, str, d):
from re import match