From: Alexander Smirnov <asmirnov@ilbers.de>
To: Henning Schild <henning.schild@siemens.com>
Cc: isar-users@googlegroups.com
Subject: Re: [PATCH 1/5] classes/base: Fix fetch task dependency
Date: Tue, 29 Aug 2017 10:54:34 +0300 [thread overview]
Message-ID: <fdf83d22-643a-0182-7511-74509e44ff76@ilbers.de> (raw)
In-Reply-To: <20170829094343.15198220@md1em3qc>
On 08/29/2017 10:43 AM, Henning Schild wrote:
> Am Tue, 29 Aug 2017 09:27:59 +0300
> schrieb Alexander Smirnov <asmirnov@ilbers.de>:
>
>> On 08/28/2017 05:57 PM, Henning Schild wrote:
>>> Am Sun, 27 Aug 2017 17:38:36 +0300
>>> schrieb Alexander Smirnov <asmirnov@ilbers.de>:
>>>
>>>> Fetch task should be run before unpack, not before build.
>>>>
>>>> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
>>>> ---
>>>> 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
next prev parent reply other threads:[~2017-08-29 7:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-27 14:38 [PATCH 0/5] Isar fixes Alexander Smirnov
2017-08-27 14:38 ` [PATCH 1/5] classes/base: Fix fetch task dependency Alexander Smirnov
2017-08-28 14:57 ` Henning Schild
2017-08-29 6:27 ` Alexander Smirnov
2017-08-29 7:43 ` Henning Schild
2017-08-29 7:54 ` Alexander Smirnov [this message]
2017-08-27 14:38 ` [PATCH 2/5] meta-isar/hello: Update recipe version Alexander Smirnov
2017-08-27 14:38 ` [PATCH 3/5] debian/stretch: Use ftp.d.o instead of deb.d.o Alexander Smirnov
2017-08-27 14:38 ` [PATCH 4/5] scripts/ci_build: Update build script Alexander Smirnov
2017-08-27 14:38 ` [PATCH 5/5] doc/technical_overview: Fix formatting Alexander Smirnov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fdf83d22-643a-0182-7511-74509e44ff76@ilbers.de \
--to=asmirnov@ilbers.de \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox