Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] archiver: check tasks exist before adding dependencies
@ 2018-09-28 13:45 Ross Burton
  2018-09-28 13:45 ` [PATCH 2/2] archiver: generalise task running when in configured mode Ross Burton
  0 siblings, 1 reply; 2+ messages in thread
From: Ross Burton @ 2018-09-28 13:45 UTC (permalink / raw)
  To: openembedded-core

Some recipes don't have do_configure, or have them but are marked as noexec.
Check for their existance before hooking up dependencies.

[ YOCTO #12868 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/archiver.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 31c9b7eb4b6..7c3e701e704 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -98,9 +98,12 @@ python () {
 
         # There is a corner case with "gcc-source-${PV}" recipes, they don't have
         # the "do_configure" task, so we need to use "do_preconfigure"
-        if pn.startswith("gcc-source-"):
+        def hasTask(task):
+            return bool(d.getVarFlag(task, "task", False)) and not bool(d.getVarFlag(task, "noexec", False))
+
+        if hasTask("do_preconfigure"):
             d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_preconfigure' % pn)
-        else:
+        elif hasTask("do_configure"):
             d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_configure' % pn)
         d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_configured' % pn)
 
-- 
2.11.0



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

end of thread, other threads:[~2018-09-28 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-28 13:45 [PATCH 1/2] archiver: check tasks exist before adding dependencies Ross Burton
2018-09-28 13:45 ` [PATCH 2/2] archiver: generalise task running when in configured mode Ross Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox