* diff between defining a "no-op" task and using [noexec]?
@ 2013-10-17 12:07 Robert P. J. Day
2013-10-18 9:41 ` Richard Purdie
0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2013-10-17 12:07 UTC (permalink / raw)
To: OE Core mailing list
using a concrete example, there's this from oe core's
linux-dummy.bb:
do_configure() {
:
}
do_compile () {
:
}
do_install() {
:
}
what is the difference between the above and writing:
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install[noexec] = "1"
*is* there a difference? if so, does it have to do with the
processing of other flags for that task?
i can see that, technically, the first variation still defines a
task to be run, while the second specifies that the task *not* be run,
so i can appreciate that those two operations have different results.
thanks.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: diff between defining a "no-op" task and using [noexec]? 2013-10-17 12:07 diff between defining a "no-op" task and using [noexec]? Robert P. J. Day @ 2013-10-18 9:41 ` Richard Purdie 2013-10-18 13:13 ` Robert P. J. Day 0 siblings, 1 reply; 5+ messages in thread From: Richard Purdie @ 2013-10-18 9:41 UTC (permalink / raw) To: Robert P. J. Day; +Cc: OE Core mailing list On Thu, 2013-10-17 at 08:07 -0400, Robert P. J. Day wrote: > using a concrete example, there's this from oe core's > linux-dummy.bb: > > do_configure() { > : > } > > do_compile () { > : > } > > do_install() { > : > } > > what is the difference between the above and writing: > > do_configure[noexec] = "1" > do_compile[noexec] = "1" > do_install[noexec] = "1" > > *is* there a difference? if so, does it have to do with the > processing of other flags for that task? > > i can see that, technically, the first variation still defines a > task to be run, while the second specifies that the task *not* be run, > so i can appreciate that those two operations have different results. The difference is just that, with the first case bitbake will run the task, it will do nothing. In the second case, bitbake will not bother running it at all. Cheers, Richard ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: diff between defining a "no-op" task and using [noexec]? 2013-10-18 9:41 ` Richard Purdie @ 2013-10-18 13:13 ` Robert P. J. Day 2013-10-18 13:42 ` Richard Purdie 0 siblings, 1 reply; 5+ messages in thread From: Robert P. J. Day @ 2013-10-18 13:13 UTC (permalink / raw) To: Richard Purdie; +Cc: OE Core mailing list On Fri, 18 Oct 2013, Richard Purdie wrote: > On Thu, 2013-10-17 at 08:07 -0400, Robert P. J. Day wrote: > > using a concrete example, there's this from oe core's > > linux-dummy.bb: > > > > do_configure() { > > : > > } > > > > do_compile () { > > : > > } > > > > do_install() { > > : > > } > > > > what is the difference between the above and writing: > > > > do_configure[noexec] = "1" > > do_compile[noexec] = "1" > > do_install[noexec] = "1" > > > > *is* there a difference? if so, does it have to do with the > > processing of other flags for that task? > > > > i can see that, technically, the first variation still defines a > > task to be run, while the second specifies that the task *not* be run, > > so i can appreciate that those two operations have different results. > > The difference is just that, with the first case bitbake will run > the task, it will do nothing. In the second case, bitbake will not > bother running it at all. i figured as much, but is there any important (pragmatic) distinction between the two if one simply wants to nullify an existing task? if there's a defined task dependency of some kind, i can certainly see how having a defined task consisting of a no-op would behave differently from specifying to not run that task at all, in terms of subsequent dependencies. does that distinction come into play anywhere? is there an example in the OE source that recognizes this? and WRT to how developers should code, is one of these approaches considered better than the other? i've seen both approaches used in recipe files, and i'm wondering simply about coding style. thanks. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: diff between defining a "no-op" task and using [noexec]? 2013-10-18 13:13 ` Robert P. J. Day @ 2013-10-18 13:42 ` Richard Purdie 2013-10-18 13:49 ` Robert P. J. Day 0 siblings, 1 reply; 5+ messages in thread From: Richard Purdie @ 2013-10-18 13:42 UTC (permalink / raw) To: Robert P. J. Day; +Cc: OE Core mailing list On Fri, 2013-10-18 at 09:13 -0400, Robert P. J. Day wrote: > On Fri, 18 Oct 2013, Richard Purdie wrote: > > > On Thu, 2013-10-17 at 08:07 -0400, Robert P. J. Day wrote: > > > using a concrete example, there's this from oe core's > > > linux-dummy.bb: > > > > > > do_configure() { > > > : > > > } > > > > > > do_compile () { > > > : > > > } > > > > > > do_install() { > > > : > > > } > > > > > > what is the difference between the above and writing: > > > > > > do_configure[noexec] = "1" > > > do_compile[noexec] = "1" > > > do_install[noexec] = "1" > > > > > > *is* there a difference? if so, does it have to do with the > > > processing of other flags for that task? > > > > > > i can see that, technically, the first variation still defines a > > > task to be run, while the second specifies that the task *not* be run, > > > so i can appreciate that those two operations have different results. > > > > The difference is just that, with the first case bitbake will run > > the task, it will do nothing. In the second case, bitbake will not > > bother running it at all. > > i figured as much, but is there any important (pragmatic) > distinction between the two if one simply wants to nullify an existing > task? One is slightly more efficient since bitbake doesn't run it at all. > if there's a defined task dependency of some kind, i can certainly > see how having a defined task consisting of a no-op would behave > differently from specifying to not run that task at all, in terms of > subsequent dependencies. does that distinction come into play > anywhere? is there an example in the OE source that recognizes this? No, the way we use noexec tasks, we still have to ensure dependencies are recognised and built before the noexec task is skipped. > and WRT to how developers should code, is one of these approaches > considered better than the other? i've seen both approaches used in > recipe files, and i'm wondering simply about coding style. thanks. noexec is newer, slightly more efficient and not used everywhere. The ":" notation is slightly more readable in some circumstances. You're looking for a "use X" type answer but I'm not giving one since sometimes one can make slightly more sense that the other and I don't want patches doing wholesale conversion from one to the other. I appreciate that is frustrating but like any things, hard and fast rules don't make sense, you should think about it. Cheers, Richard ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: diff between defining a "no-op" task and using [noexec]? 2013-10-18 13:42 ` Richard Purdie @ 2013-10-18 13:49 ` Robert P. J. Day 0 siblings, 0 replies; 5+ messages in thread From: Robert P. J. Day @ 2013-10-18 13:49 UTC (permalink / raw) To: Richard Purdie; +Cc: OE Core mailing list On Fri, 18 Oct 2013, Richard Purdie wrote: > On Fri, 2013-10-18 at 09:13 -0400, Robert P. J. Day wrote: ... snip ... > > i figured as much, but is there any important (pragmatic) > > distinction between the two if one simply wants to nullify an > > existing task? > > One is slightly more efficient since bitbake doesn't run it at all. > > > if there's a defined task dependency of some kind, i can > > certainly see how having a defined task consisting of a no-op > > would behave differently from specifying to not run that task at > > all, in terms of subsequent dependencies. does that distinction > > come into play anywhere? is there an example in the OE source that > > recognizes this? > > No, the way we use noexec tasks, we still have to ensure > dependencies are recognised and built before the noexec task is > skipped. ah, that answers that question. > > and WRT to how developers should code, is one of these > > approaches considered better than the other? i've seen both > > approaches used in recipe files, and i'm wondering simply about > > coding style. thanks. > > noexec is newer, slightly more efficient and not used everywhere. > The ":" notation is slightly more readable in some circumstances. > > You're looking for a "use X" type answer but I'm not giving one > since sometimes one can make slightly more sense that the other and > I don't want patches doing wholesale conversion from one to the > other. I appreciate that is frustrating but like any things, hard > and fast rules don't make sense, you should think about it. i'm good with all that, thanks. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-18 13:49 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-10-17 12:07 diff between defining a "no-op" task and using [noexec]? Robert P. J. Day 2013-10-18 9:41 ` Richard Purdie 2013-10-18 13:13 ` Robert P. J. Day 2013-10-18 13:42 ` Richard Purdie 2013-10-18 13:49 ` Robert P. J. Day
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.