From: Richard Purdie <rpurdie@rpsys.net>
To: openembedded-devel@openembedded.org
Subject: Re: Inheriting conditionally
Date: Wed, 08 Aug 2007 13:19:39 +0100 [thread overview]
Message-ID: <1186575579.6091.43.camel@localhost.localdomain> (raw)
In-Reply-To: <d543f5920708071623g37c9844fs47db2c11d73d1ec9@mail.gmail.com>
Hi,
On Tue, 2007-08-07 at 18:23 -0500, Matt Hoosier wrote:
> I'm search for a syntax that will allow me to inherit from certain
> classes only when using a particular distribution. Is there some good
> way to do this, like maybe:
>
> python {
> if bb.getVar("DISTRO") == "mydistro"
> # some API call to add inherited class
> }
>
> The particular thing I want to accomplish is to use the update-rc.d
> functionality to start a daemon systemwide only when targeting my own
> distro; it's nonstandard and wouldn't be appropriate for most
> distributions.
I can't think of a way to do this 100% neatly, the following is my best
idea:
SYSTEMWIDEDAEMON = "dummy"
SYSTEMWIDEDAEMON_mydistro = "myspecialclass"
inherit ${SYSTEMWIDEDAEMON}
The ugly bit is it needs an empty dummy.bbclass.
A quick test here suggests it might be harmless to use "base" there
since base will always have already been included...
Cheers,
Richard
next prev parent reply other threads:[~2007-08-08 12:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-07 23:23 Inheriting conditionally Matt Hoosier
2007-08-08 12:19 ` Richard Purdie [this message]
2007-08-08 13:20 ` Matt Hoosier
2007-08-08 13:58 ` Dr. Michael Lauer
2007-08-08 15:35 ` Matt Hoosier
2007-08-08 15:37 ` Matt Hoosier
2007-08-08 15:43 ` Dr. Michael Lauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1186575579.6091.43.camel@localhost.localdomain \
--to=rpurdie@rpsys.net \
--cc=openembedded-devel@lists.openembedded.org \
--cc=openembedded-devel@openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.