From patchwork Fri Sep 28 13:45:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 147789 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp785984lji; Fri, 28 Sep 2018 06:45:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV63YJ8Fiv7GHRKajKuBxKxfpH8aybpz3bVFGWSeP+P4udyXnH25PzA5eUrmI6ScG11/hekyr X-Received: by 2002:a63:2f81:: with SMTP id v123-v6mr6751072pgv.223.1538142352804; Fri, 28 Sep 2018 06:45:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538142352; cv=none; d=google.com; s=arc-20160816; b=eF0TZPrjUJdLKweCTYhykShkmtF+6wT5T8iuSdrNM9hWRP4KP8Q7qM5OLufrrvC+u8 wYpPm7sqGUjryyR0raIAf3Svn0bDXrhmq6uCGCqsUXb3AUD7s3vzWq0w/7+rKa33J0rO Mzi7GlXYVbWJ4RaBexqnUg11zFRbAMMZJaQX3qSRZgsiueDcYyX9fMIHMxnWZxxN+yUP LJr5shik+aDfPBnhFFYkGpG7cRE7jVtipdwFi86cpDDHQcrZSWsX/jCM8aMWhT7UC1no hv1H8tWNmUzU3UOGFVs1hnhJw/c5zI3XW29BreADjzi7qBGbd7+ZQ4i7XeVRDbtdTHUr +Xbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=Ik2HLE8T94pu5wBPTwo8NC7xYKFRxluVXMQmxfnRapo=; b=XrL/pOweQ9wcpqYxc5Vf0k5LqU22WOAa6YO6qKAwOZEG7lF7Vx8gWwr+i2Mj4r5aN1 G7oAltqhxeBi53MzGKWrjg/t5rTTJo3OzT7UBz6a6zTAIl5QhMDUHMnGZxESD+Q5Wqkx eCVe7qNNj2cjPRIodRVEHnlXd/BPlW00vBYXZMLmA5kfvKJu10b7zQeRXoahNVXfFRoX dcg9BGq1N3SxRXDx4G1SfHV0jpH/ejyOwEImLCkl/pp2pMOekJ9VwSOkFMSpM+Z3qrWC 0IxfRMKMCM40J0UVIFk3ueQskVMHXKwY317xjcduS5KsfPP5oAS9hwsye6uHL8QnLomS PxIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="dX/AJKPy"; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id h69-v6si4622298pge.13.2018.09.28.06.45.52; Fri, 28 Sep 2018 06:45:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="dX/AJKPy"; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from 165.28.230.35.bc.googleusercontent.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 66489799C6; Fri, 28 Sep 2018 13:45:47 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mail.openembedded.org (Postfix) with ESMTP id 31D3874C97 for ; Fri, 28 Sep 2018 13:45:44 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id y8-v6so6469922wrh.7 for ; Fri, 28 Sep 2018 06:45:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=7B1/eHnybHgJUVsD0T1KQ4MUE1SbFJIJY1mkv6Tqo7Q=; b=dX/AJKPyAyfTsGw1cSxRWOwWPUOcZTKGnjEgD28aaJgjcTPjWl+au7xe+icjE6DrcQ PTLsNCOGdIGCxw/gsAQxr4FzWgYDjx5nHL9vMDYlErGqfqx2s/Fc79Y9sjUWWVNKgifL 8Yqlpia/7BNFScsLPq+lGYCJJUgxZaAPlj3pfM3eZPK/zDcpGP7on1T7Gf7qFfGyKqUL iw4LenFl0D9KcFwJfQWaQ1ykCU/6+b/XSYKl/LukhNugF2RApoH7ipLmPMB/f1leBB1P iYLhklo9Er3q33UH4aHKkjk+y3c1MuL3fpTySMX0pgwb6z0SBeNbCW00j3RXgzu/8zXr RWSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=7B1/eHnybHgJUVsD0T1KQ4MUE1SbFJIJY1mkv6Tqo7Q=; b=QdBE2v0erA1QD/KtTbbfrzq0vfk/15SRxah07svLUIiPRa2mAmbmRX2b28a2xMYIwt lauuKLVbYcUZ6dPbupXtyvG4K3s3xIxqeRT8b0RoCGaHKsBy2KLfl4U2CYJ+CdifwrN0 rXLfIPUEr8FwhWOpHeEotoqftxHcaqORfsj6ozJERfIvHuKpLLadYJUqELGpcOJQR8Ap fbJfRFEd1NUcsLcDAmOLD0QAUKpXwuNMQT2D+/0Pt6cDgljzaBoBWehIiTfspWn/Bbw1 JgVOyPUHreR/j8UyC4oXMLnXAm4q8KG271M1Ni2V59w1sV7qZzKYmR/mvAxI/qOi8lSV okEw== X-Gm-Message-State: ABuFfoikumIRcDg1+JY3JkyJFWJWmUgfeyJnR/16Ttaoi4lccWWGGU+I Rx/cr7jTl2SwvtK0d/MTWPlw+pdN304= X-Received: by 2002:adf:a708:: with SMTP id c8-v6mr12972964wrd.56.1538142345085; Fri, 28 Sep 2018 06:45:45 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id b138-v6sm2016405wmb.1.2018.09.28.06.45.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Sep 2018 06:45:43 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Fri, 28 Sep 2018 14:45:40 +0100 Message-Id: <20180928134541.1370-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH 1/2] archiver: check tasks exist before adding dependencies X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org 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 --- meta/classes/archiver.bbclass | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core 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) From patchwork Fri Sep 28 13:45:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 147790 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp786202lji; Fri, 28 Sep 2018 06:46:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV61SHqZmGRUafc4X80nkqR5XMMDYnTE8NEDkLV9EFlVfXQhQoHBVHgrgPK16LnfzgwATLGoI X-Received: by 2002:a17:902:7b94:: with SMTP id w20-v6mr2090086pll.56.1538142365131; Fri, 28 Sep 2018 06:46:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538142365; cv=none; d=google.com; s=arc-20160816; b=aY32zSqCMwoNdixHH09fK9yD9uzahv2IWsv13f2aCipPcgDX0Yuoj43z7CK1J0UtJs svvTKyrV1JzBi9PSxvY0ER/iLZ9ikW1q3Aej712elpM2wmAm2Mgjo2KB9Df6j3cC6L3v 89MTPzq3D+wGY3IX8Y30ng5Wo9D26N1Tear96frYEBIHnWoYLoCak6ysxsfvRYyGNcPe h6XyadKuE6JzcbCHkW/sz+9lwdTWX9z1vldqDTLDJ+TK+/aKfgPyF3jawS1KfmQF917g iKBNtfDOr5h81nmx90rAT2Uv4yAheOGTtYW4GvpWhefINit2DTDfHQify9oiQ2NpL/0P ex2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=AHhU94tTtD/uzZxovEdcfcgaqoZTZaBf4qwelwyT6ZA=; b=IG6HmGzJxvyaN+rscAoG6ex5/iX01B/a54hhqa3jMhQN4VfJJh00Gx8GBM/6ht4Qov oDuFJKohHZJ8jSLdq1lxg7iVOo6EZ8sf5QPLDGNK8g2HZgEA0PP9bL6cB/D6/JpE/B+Y WbpKgtQgesJ8ephmTn3PvdfKRQ705RFs2vnIA4vbtXo3vgmri91bGo0PhhYSFwxu81uW Q766cpiz5jfJ6yA0OWaz9/7pHv/NYsuPrAKD69ooHeuwa8kknMC445FsvZFanutP2QAL Q27EQpkCDJCnwOt+wUmZ87G64yFIHZnZsG+W71LbrIs6d21OOb/E8B0/eRFpbX7MaMvV d7Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=dEeHb8Js; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id n5-v6si4865624pgh.397.2018.09.28.06.46.04; Fri, 28 Sep 2018 06:46:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=dEeHb8Js; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from 165.28.230.35.bc.googleusercontent.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 280BB799C4; Fri, 28 Sep 2018 13:46:02 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mail.openembedded.org (Postfix) with ESMTP id 3070574C97 for ; Fri, 28 Sep 2018 13:45:46 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id y3-v6so1899918wma.1 for ; Fri, 28 Sep 2018 06:45:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=JrCvEBjR6rHwV1aj+UYfpeN01/DD0FBjJtF4RSY8crc=; b=dEeHb8Jsi2xMEvBLCg0Dnp9kUFWebebur3YdR5qrcrpknEuMM9CxjoqBvcnzLw3ZYo DdQAI/P/mo813N4yXavH4mixb9dWMUmA+SCf/au2UFC95tCa6/5OrYVEGpcG05zKrHxP krsKvehlQs8x67L76wxdiTOFNCbpEuMPNrlIaXiTTrA9yp32C7aCD0M/xFrA6WsRDAja +1PCkTyC/jJDwV0sPVcJhbjfUNiKwhtBr96K004OFDPK5HlNnOpB5nOe5hBC6FF+xOOB a5T5rgKpG2wW7z6Ng8vmT6EhvDJjoRhfLfkdaB4ha+YJMZ/8RuASRWnV7Hxjp6A+mVaS vGjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=JrCvEBjR6rHwV1aj+UYfpeN01/DD0FBjJtF4RSY8crc=; b=XHY5CWnYLDae4Ool486fHOodMFP8C4fc46EalhjSgPZUmMxaJ/UEUP3sT597kyJrgD vaosO2Sn/iTgUhQtA/X0gtuDOXtBVhARIaMljJx+AIg5Th4IGDyBUidFYoBW09u6iKlF 1xdLWVWw1vLi2M7YB3yaI+QlrhF+ptuNDwgBp8CDNMPBaJP7fRy6fMYVPrCzUnNAhhZY lG6WBjnEmCO54g9sxUgBF/xbxxcvqnEHbXVycAhLVY10T1tW2e2FSciC8NTQ+wKBHeku bLgtCHg2MVWngI0TCS7yvElx4EGVrRoSmoVWg18zk6XeVtg+O2e4GMpP7+YCnqqpHD88 w/Tg== X-Gm-Message-State: ABuFfoibj/4Dy0JvuEF91gN36CNY0p+1dJZPvtL7qvJnkZseJ6IA4g5G R8pbmp+ovuHwH2B18Nnde9ix1Prr9rM= X-Received: by 2002:a1c:1783:: with SMTP id 125-v6mr1906181wmx.75.1538142346527; Fri, 28 Sep 2018 06:45:46 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id b138-v6sm2016405wmb.1.2018.09.28.06.45.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Sep 2018 06:45:45 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Fri, 28 Sep 2018 14:45:41 +0100 Message-Id: <20180928134541.1370-2-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180928134541.1370-1-ross.burton@intel.com> References: <20180928134541.1370-1-ross.burton@intel.com> Subject: [OE-core] [PATCH 2/2] archiver: generalise task running when in configured mode X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org When in configured mode the archive will re-run configure itself, but that doesn't work if there are other tasks that need to run such as cmake's generate_toolchain_file. Instead of hard-coding a list of classes and tasks, obtain the list of tasks preceeding do_configure, filter out ones we don't want to re-run such as do_patch and do_prepare_recipe_sysroot, and run those too. Signed-off-by: Ross Burton --- meta/classes/archiver.bbclass | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 7c3e701e704..a54cf948f3e 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass @@ -246,21 +246,27 @@ python do_ar_configured() { # do_configure, we archive the already configured ${S} to # instead of. elif pn != 'libtool-native': + def runTask(task): + bb.warn("running %s" % task) + prefuncs = d.getVarFlag(task, 'prefuncs') or '' + for func in prefuncs.split(): + if func != "sysroot_cleansstate": + bb.build.exec_func(func, d) + bb.build.exec_func(task, d) + postfuncs = d.getVarFlag(task, 'postfuncs') or '' + for func in postfuncs.split(): + if func != 'do_qa_configure': + bb.build.exec_func(func, d) + # Change the WORKDIR to make do_configure run in another dir. d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR')) - if bb.data.inherits_class('kernel-yocto', d): - bb.build.exec_func('do_kernel_configme', d) - if bb.data.inherits_class('cmake', d): - bb.build.exec_func('do_generate_toolchain_file', d) - prefuncs = d.getVarFlag('do_configure', 'prefuncs') - for func in (prefuncs or '').split(): - if func != "sysroot_cleansstate": - bb.build.exec_func(func, d) - bb.build.exec_func('do_configure', d) - postfuncs = d.getVarFlag('do_configure', 'postfuncs') - for func in (postfuncs or '').split(): - if func != "do_qa_configure": - bb.build.exec_func(func, d) + + preceeds = bb.build.preceedtask('do_configure', False, d) + for task in preceeds: + if task != 'do_patch' and task != 'do_prepare_recipe_sysroot': + runTask(task) + runTask('do_configure') + srcdir = d.getVar('S') builddir = d.getVar('B') if srcdir != builddir: