public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Alexander Smirnov <asmirnov@ilbers.de>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH 1/5] classes/base: Fix fetch task dependency
Date: Tue, 29 Aug 2017 09:43:43 +0200	[thread overview]
Message-ID: <20170829094343.15198220@md1em3qc> (raw)
In-Reply-To: <acf788a6-c0cc-a86b-0fa8-90b6ac64f72b@ilbers.de>

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. 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.

Henning

  reply	other threads:[~2017-08-29  7:43 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 [this message]
2017-08-29  7:54         ` Alexander Smirnov
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=20170829094343.15198220@md1em3qc \
    --to=henning.schild@siemens.com \
    --cc=asmirnov@ilbers.de \
    --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