diff options
author | Robert Schuster <thebohemian@openembedded.org> | 2008-10-17 11:41:20 +0200 |
---|---|---|
committer | Robert Schuster <thebohemian@openembedded.org> | 2008-10-22 14:52:09 +0200 |
commit | 9c991af9e1fb60fafa3c12d31ba87990b410e39f (patch) | |
tree | e2999881ab522132c779126bfb79d71f1ef147eb /classes/base.bbclass | |
parent | c4cfa290f4e64299870ef9883aa9d3dd30f0e672 (diff) | |
download | openembedded-9c991af9e1fb60fafa3c12d31ba87990b410e39f.tar.gz |
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.bbclass | 17 |
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 = [] |