[CONSOLIDATED,REQUEST,40/64] base.bbclass: allow specifying an lsb distro hook via the metadata
Submitted by Saul Wold on Aug. 14, 2012, 12:13 p.m.
|
Patch ID: 34585
Details
Commit Message
@@ -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 "$*"
}