Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Valek, Andrej" <andrej.valek@siemens.com>
To: "marex@denx.de" <marex@denx.de>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>,
	"peter.kjellerstedt@axis.com" <peter.kjellerstedt@axis.com>
Cc: "richard.purdie@linuxfoundation.org"
	<richard.purdie@linuxfoundation.org>
Subject: Re: [OE-core] [PATCH] Revert "featimage: refactor style"
Date: Wed, 2 Feb 2022 06:51:18 +0000	[thread overview]
Message-ID: <613436ece6c481bbd5efda1774bb45be2960988e.camel@siemens.com> (raw)
In-Reply-To: <251fe11a-7348-086f-364b-b9940fff3d68@denx.de>

Marek,

Sorry, but these are still not an arguments, why to do that.

On Mon, 2022-01-31 at 10:39 +0100, Marek Vasut wrote:
> On 1/31/22 08:01, Valek, Andrej wrote:
> > Hi,
> 
> Hello Andrej,
> 
> (please avoid top-posting)
> 
> > Sorry, but personally I don't like your idea. What's the benefit of
> > reverting this? I would keep the ${} for bitbake and $ for shell. The
> > {} has to be placed only for variables like $a${b}c.
> 
> That's exactly the benefit of using ${} in shell scripts consistently -
> - 
> you don't have to worry about variable names being accidentally 
> conflated with surrounding strings, either due to your own mistake, or 
> some automated transformation that was applied incorrectly .
> 
> > We should respect the workflow on all recipes otherwise we're braking
> > the "unwritten" rules.
> 
> The workflow on all recipes ? What does this mean ?
> 
> broken by people. Better update the documentation.
> 
> There is one technical counter-argument to this revert from Peter,
> quote:
> "
> There is actually a technical reason to not use ${foo} for shell
> variables unless necessary in bitbake files and it is because
> bitbake will treat them all as potential bitbake variables. This
> means they are unnecessarily included in the taskhashes that
> bitbake calculates.
> "
> 
> But the patch being reverted here addresses the problem only partly, 
> because it still contains remnants like this:
> "
> conf_desc="$conf_desc${sep}setup"
> "
Just for your information, this is not remnants, this is exactly the
right {} usage. If you didn't place the {}, it will be
conf_desc="$conf_desc$sepsetup", which doesn't  make any sense.
> 
> [...]
> 
> > > > > third alternative ? I mean, besides rewriting the fitimage
> > > > > generation into python, which might make it more flexible too.
> > > > 
> > > > Replacing shell code that has grown beyond a couple of hundred
> > > > (tens?) lines with something written in a better language is
> > > > almost always a good idea.
> > > 
> > > It's grown to almost 800 LoC, so maybe it is time to reevaluate the
> > > python conversion then.
> 
> So a rewrite into something more suitable might be a good idea ^ , 
> probably python in this case.

But anyway, if you want to do that, then do not forget for other kernel
classes, where the same commits have been applied by someone else.

So from my point of view, it has to stay like it is.

Cheers,
Andrej


  reply	other threads:[~2022-02-02  6:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-29  0:29 [PATCH] Revert "featimage: refactor style" Marek Vasut
2022-01-29  1:06 ` [OE-core] " Peter Kjellerstedt
2022-01-29  1:38   ` Marek Vasut
2022-01-29  2:01     ` Peter Kjellerstedt
2022-01-29  2:36       ` Marek Vasut
2022-01-31  7:01         ` Valek, Andrej
2022-01-31  9:39           ` Marek Vasut
2022-02-02  6:51             ` Valek, Andrej [this message]
2022-02-02  8:17               ` Marek Vasut
2022-02-02  9:03                 ` Valek, Andrej

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=613436ece6c481bbd5efda1774bb45be2960988e.camel@siemens.com \
    --to=andrej.valek@siemens.com \
    --cc=marex@denx.de \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=peter.kjellerstedt@axis.com \
    --cc=richard.purdie@linuxfoundation.org \
    /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