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: