All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] base.bbclass: allow specifying an lsb distro hook via the metadata
@ 2012-08-02 22:10 Christopher Larson
  2012-08-16 17:49 ` Saul Wold
  0 siblings, 1 reply; 2+ messages in thread
From: Christopher Larson @ 2012-08-02 22:10 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

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>
---
 meta/classes/base.bbclass |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e15fa26..192c777 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 "$*"
 }
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] base.bbclass: allow specifying an lsb distro hook via the metadata
  2012-08-02 22:10 [PATCH] base.bbclass: allow specifying an lsb distro hook via the metadata Christopher Larson
@ 2012-08-16 17:49 ` Saul Wold
  0 siblings, 0 replies; 2+ messages in thread
From: Saul Wold @ 2012-08-16 17:49 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Christopher Larson

On 08/02/2012 03:10 PM, Christopher Larson wrote:
> From: Christopher Larson <chris_larson@mentor.com>
>
> 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>
> ---
>   meta/classes/base.bbclass |   12 +++++++++++-
>   1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index e15fa26..192c777 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 "$*"
>   }
>
Merged into OE-Core

Thanks
	Sau!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-16 18:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-02 22:10 [PATCH] base.bbclass: allow specifying an lsb distro hook via the metadata Christopher Larson
2012-08-16 17:49 ` Saul Wold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.