summaryrefslogtreecommitdiff
path: root/classes/base.bbclass
diff options
context:
space:
mode:
authorRobert Schuster <thebohemian@openembedded.org>2008-10-17 11:41:20 +0200
committerRobert Schuster <thebohemian@openembedded.org>2008-10-22 14:52:09 +0200
commit9c991af9e1fb60fafa3c12d31ba87990b410e39f (patch)
treee2999881ab522132c779126bfb79d71f1ef147eb /classes/base.bbclass
parentc4cfa290f4e64299870ef9883aa9d3dd30f0e672 (diff)
Added BPN/BP functionality (see #11716)
base.bbclass: Added base_package_name python function. java-library.bbclass: Removed java_back_package_name function. bitbake.conf: Set BP/BPN and use it in FILESPATH and S
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r--classes/base.bbclass17
1 files changed, 17 insertions, 0 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index b50bc8667c..071acfa015 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 = []