From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6458964006491127808 X-Received: by 10.28.51.147 with SMTP id z141mr96356wmz.26.1503993282963; Tue, 29 Aug 2017 00:54:42 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.64.146 with SMTP id r18ls160539lje.33.gmail; Tue, 29 Aug 2017 00:54:42 -0700 (PDT) X-Google-Smtp-Source: ADKCNb5MpyX5W61DNVPD4TqhHCAa8DoGJn4ycifblUyg3SqqU2BW31LWNcDYnSF/nlEffCRSq2uj X-Received: by 10.46.2.92 with SMTP id 89mr260210ljc.34.1503993282528; Tue, 29 Aug 2017 00:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503993282; cv=none; d=google.com; s=arc-20160816; b=hLwtpUTSpDPtwi7b/SWmQ7QXAAJSPCDlWtQ9JDCgbYjkknWkg7GDAiR/yxlDm+1szp eMKgZecTiwYOGmH8UQSsI+wSOqiAaX6W/4cV/cKjxAZtd183hmZFnsb9kUUSTQU0TEmI oLOgWgfbKgIEKGSm8IpOHW7RN6AHvQH1EkCkNgLEMx4Qy0303aWjQkmp8teF8rAatt7+ 694KpcPEo2F73cxzRmmjg9R9oI2gtWyuX2RBLSlZkL60bAnMG5Z2dMAg3v7TDVDk6HdS smlZOo60MyIg4Ber3cN7oV12bClC+gup2sXl0PA5vuZaaW0pt0h2+eeO4RhKSFaC8W6n YEtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :arc-authentication-results; bh=0s5YMWCuGtlEMX3Tn19Efosz+QiAbnbOdmV20kbW590=; b=k9fsVcFKNKizzknmk3rhehaniwFKCnvWPNDdkyPJyGOkgPwQ5VN2xMPPyiVV07eIFO kjaRjsFRs1/LuvlGPGwmXwyAw768uOB+cqYuWFVG+7J3aF+CUnldJhqtkdLo5eFNByr+ E4bwzFZF6dDf9Op752Wl60v4iUpEYXi2/XrMFcif5XweW68suwYjkM8qUb83+MfrUY9E 8bj7Qorpwy017gBrYZr5FjORfq7xVbt5puYjVbd80NFpy5RYCPNs2BJJn8xOsjswuevx U4B6WWBOmwPIXutbpodtwfQ/YgpWB5jDzcPPlL1HakBTp4yaU3Sb5rlAikI19UEhoYVp /N1g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id b196si59602wmd.3.2017.08.29.00.54.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Aug 2017 00:54:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from [10.0.2.15] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id v7T7sdlS013320 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 29 Aug 2017 09:54:41 +0200 Subject: Re: [PATCH 1/5] classes/base: Fix fetch task dependency To: Henning Schild Cc: isar-users@googlegroups.com References: <20170827143840.12436-1-asmirnov@ilbers.de> <20170827143840.12436-2-asmirnov@ilbers.de> <20170828165713.207c248c@md1em3qc> <20170829094343.15198220@md1em3qc> From: Alexander Smirnov Message-ID: Date: Tue, 29 Aug 2017 10:54:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170829094343.15198220@md1em3qc> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: yjSfC1LKxBqX On 08/29/2017 10:43 AM, Henning Schild wrote: > Am Tue, 29 Aug 2017 09:27:59 +0300 > schrieb Alexander Smirnov : > >> On 08/28/2017 05:57 PM, Henning Schild wrote: >>> Am Sun, 27 Aug 2017 17:38:36 +0300 >>> schrieb Alexander Smirnov : >>> >>>> Fetch task should be run before unpack, not before build. >>>> >>>> Signed-off-by: Alexander Smirnov >>>> --- >>>> meta/classes/dpkg.bbclass | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass >>>> index 23d5e6c..360a95c 100644 >>>> --- a/meta/classes/dpkg.bbclass >>>> +++ b/meta/classes/dpkg.bbclass >>>> @@ -25,7 +25,7 @@ python do_fetch() { >>>> raise bb.build.FuncFailed(e) >>>> } >>>> >>>> -addtask fetch before do_build >>>> +addtask fetch before do_unpack >>>> >>>> do_unpack[dirs] = "${BUILDROOT}" >>>> do_unpack[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}" >>> >>> A few lines below that you find: >>> >>>> addtask unpack after do_fetch before do_build >>> >>> With this patch you would have the order expressed twice, which is >>> not a good idea. This patches does not change anything, it just >>> introduces redundant information. >> >> This patch is not about technical issues, it just improves code >> readability and explicitly defines the order of tasks. If task fetch >> should go before unpack, it would be more evident do define it in >> this way. > > The order is already explicit. The order is not actually explicit, the line: addtask fetch before do_build doesn't provide information that fetch task stays before unpack. You need to reference another line in code to get this information. > Writing it down twice is redundant. And > redundancy means that future changes would have to keep both > expressions in sync. > In my point of view it harms readability because one has to still read > both expressions and make sure to what result they will add up. Instead, with such definition one doesn't need to read both lines, each line provides self-contained information about order of tasks in pipeline. Also do_fetch task will go to base class because it's generic. Alex