All of lore.kernel.org
 help / color / mirror / Atom feed
From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
To: openembedded-core@lists.openembedded.org
Subject: Re: i guess there's no way to *conditionally* add tasks?
Date: Tue, 05 Aug 2014 13:28:45 +0200	[thread overview]
Message-ID: <lysilbch02.fsf@ensc-virt.intern.sigma-chemnitz.de> (raw)
In-Reply-To: <alpine.LFD.2.11.1408050640270.7701@localhost> (Robert P. J. Day's message of "Tue, 5 Aug 2014 06:42:28 -0400 (EDT)")

"Robert P. J. Day" <rpjday-L09J2beyid0N/H6P543EQg@public.gmane.org>
writes:

> addtask configure_ptest_base after do_configure before do_compile
> addtask compile_ptest_base   after do_compile   before do_install
> addtask install_ptest_base   after do_install   before do_package do_populate_sysroot
> ...
>     # Remove all '*ptest_base' tasks when ptest is not enabled
>     if not(d.getVar('PTEST_ENABLED', True) == "1"):
>         for i in ['do_configure_ptest_base', 'do_compile_ptest_base', 'do_install_ptest_base']:
>             bb.build.deltask(i, d)
>
>   so i'm guessing there's no way to conditionally add task(s) to avoid
> adding them, only to turn around and delete them, yes?

I solved similar issues by including files conditionally; e.g. above
would be

---
ptest_inc = "${@['noop', 'ptest'][d.getVar('PTEST_ENABLED', True) == '1']}"
include ptest-${ptest_inc}.inc

--- ptest-ptest.inc ---
addtask configure_ptest_base after do_configure before do_compile
addtask compile_ptest_base   after do_compile   before do_install
addtask install_ptest_base   after do_install   before do_package
do_populate_sysroot



Enrico


  reply	other threads:[~2014-08-05 11:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05 10:42 i guess there's no way to *conditionally* add tasks? Robert P. J. Day
2014-08-05 11:28 ` Enrico Scholz [this message]
2014-08-05 12:06   ` Paul Eggleton

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=lysilbch02.fsf@ensc-virt.intern.sigma-chemnitz.de \
    --to=enrico.scholz@sigma-chemnitz.de \
    --cc=openembedded-core@lists.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.