aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2012-08-02 15:10:50 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-15 14:25:49 +0100
commit0e9932b2dba8573736c92bd07e59bad21b9fda2d (patch)
treee7959b151f2a491693a9f512b69d2c1a91a7c36f /meta/classes
parenta1e4d32ede287f73c6acc796b43fe5b90c072fab (diff)
downloadopenembedded-core-contrib-0e9932b2dba8573736c92bd07e59bad21b9fda2d.tar.gz
base.bbclass: allow specifying an lsb distro hook via the metadata
This is useful when you have a rather large set of compatible distros. For example: Centos 5.4, 5.5, 5.6, etc, RHEL server 5.x, RHEL workstation 5.x. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/base.bbclass12
1 files changed, 11 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e15fa26ff6a..192c77761eb 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -34,11 +34,21 @@ def oe_import(d):
python oe_import_eh () {
if isinstance(e, bb.event.ConfigParsed):
oe_import(e.data)
- e.data.setVar("NATIVELSBSTRING", oe.lsb.distro_identifier())
+ e.data.setVar("NATIVELSBSTRING", lsb_distro_identifier(e.data))
}
addhandler oe_import_eh
+def lsb_distro_identifier(d):
+ adjust = d.getVar('LSB_DISTRO_ADJUST', True)
+ adjust_func = None
+ if adjust:
+ try:
+ adjust_func = globals()[adjust]
+ except KeyError:
+ pass
+ return oe.lsb.distro_identifier(adjust_func)
+
die() {
bbfatal "$*"
}