Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-28 Thread Simon Glass
Hi, On Tue, 26 Oct 2021 at 04:16, Wolfgang Denk wrote: > > Dear Simon, > > In message > you > wrote: > > > > > > We need the space between the bootargs. > > > > > > Exactly like that, and for the case where you want to append something > > > _without_ an extra space there's the .=3D operator

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-26 Thread Wolfgang Denk
Dear Simon, In message you wrote: > > > > We need the space between the bootargs. > > > > Exactly like that, and for the case where you want to append something > > _without_ an extra space there's the .=3D operator I also suggested. > > Do you have a link to the docs for that? > > Perhaps we

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-25 Thread Rasmus Villemoes
On 25/10/2021 17.18, Simon Glass wrote: > Hi Rasmus, > > On Mon, 25 Oct 2021 at 01:06, Rasmus Villemoes > wrote: >> Exactly, there's really never any case where that would be sensible. But >> I would probably go a bit further and simply restrict varnames to the >> usual alphanumerics plus

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-25 Thread Simon Glass
Hi Rasmus, On Mon, 25 Oct 2021 at 01:06, Rasmus Villemoes wrote: > > On 24/10/2021 21.54, Simon Glass wrote: > > Hi Rasmus, > > > > On Fri, 22 Oct 2021 at 00:41, Rasmus Villemoes > > wrote: > >> > >> On 21/10/2021 18.03, Tom Rini wrote: > >>> On Thu, Oct 21, 2021 at 09:59:38AM -0600, Simon

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-25 Thread Wolfgang Denk
Dear Tom, In message <20211024164404.GQ3577824@bill-the-cat> you wrote: > > > It is a convenience tool, and it is OK if it has a few restrictions, > > like for the character set of supported variable names. > > > > But: > > > > 1) These restrictions must be clearly documented, both in the

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-25 Thread Rasmus Villemoes
On 24/10/2021 21.54, Simon Glass wrote: > Hi Rasmus, > > On Fri, 22 Oct 2021 at 00:41, Rasmus Villemoes > wrote: >> >> On 21/10/2021 18.03, Tom Rini wrote: >>> On Thu, Oct 21, 2021 at 09:59:38AM -0600, Simon Glass wrote: Hi Marek, On Thu, 21 Oct 2021 at 07:28, Marek Behún wrote:

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-24 Thread Simon Glass
Hi Rasmus, On Fri, 22 Oct 2021 at 00:41, Rasmus Villemoes wrote: > > On 21/10/2021 18.03, Tom Rini wrote: > > On Thu, Oct 21, 2021 at 09:59:38AM -0600, Simon Glass wrote: > >> Hi Marek, > >> > >> On Thu, 21 Oct 2021 at 07:28, Marek Behún wrote: > >>> > >>> On Thu, 21 Oct 2021 15:25:37 +0200 >

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-24 Thread Tom Rini
On Sun, Oct 24, 2021 at 05:46:00PM +0200, Wolfgang Denk wrote: > Dear Tom, > > In message <20211022144759.GG3577824@bill-the-cat> you wrote: > > > > > Any escape character is also a legal name character. > > > > I am struggling to have a non-meme reaction to this. Perhaps the best > > step is

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-24 Thread Wolfgang Denk
Dear Tom, In message <20211022144759.GG3577824@bill-the-cat> you wrote: > > > Any escape character is also a legal name character. > > I am struggling to have a non-meme reaction to this. Perhaps the best > step is just earlier on in the series note that variable names need to > fit within the

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Tom Rini
On Fri, Oct 22, 2021 at 10:06:55AM +0200, Wolfgang Denk wrote: > Dear Simon, > > In message > you > wrote: > > > > > > i.e. > > > > var+=value > > > > appends value to var, while > > > > var\+=value > > > > sets variable with name "var+" > > > > My first preference is to disallow + at the

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Tom Rini
On Fri, Oct 22, 2021 at 10:08:05AM +0200, Wolfgang Denk wrote: > Dear Tom, > > In message <20211021160311.GC3577824@bill-the-cat> you wrote: > > > > How bad does it make the parser look if we allow trailing + in variable > > names, by escaping them? It's seemingly the substantive objection at >

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Marek Behún
Hello Wolfgang, On Fri, 22 Oct 2021 10:06:55 +0200 Wolfgang Denk wrote: > For the '+=' case, there is no way to escape the '+', as all > commonly used escapes are valid characters in the variable name, > too. We can define that backslash is to be also escaped if it is to be used as variable

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Rasmus Villemoes
On 21/10/2021 18.03, Tom Rini wrote: > On Thu, Oct 21, 2021 at 09:59:38AM -0600, Simon Glass wrote: >> Hi Marek, >> >> On Thu, 21 Oct 2021 at 07:28, Marek Behún wrote: >>> >>> On Thu, 21 Oct 2021 15:25:37 +0200 >>> Marek Behún wrote: >>> Hello, On Thu, 21 Oct 2021 15:06:51 +0200

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Wolfgang Denk
Dear Tom, In message <20211021160311.GC3577824@bill-the-cat> you wrote: > > How bad does it make the parser look if we allow trailing + in variable > names, by escaping them? It's seemingly the substantive objection at > this point. Any escape character is also a legal name character. Best

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-22 Thread Wolfgang Denk
Dear Simon, In message you wrote: > > > > i.e. > > > var+=value > > > appends value to var, while > > > var\+=value > > > sets variable with name "var+" > > My first preference is to disallow + at the end of an end var. Perhaps > we can start printing a warning if people do it, for a few

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Simon Glass
Hi Tom, On Thu, 21 Oct 2021 at 10:03, Tom Rini wrote: > > On Thu, Oct 21, 2021 at 09:59:38AM -0600, Simon Glass wrote: > > Hi Marek, > > > > On Thu, 21 Oct 2021 at 07:28, Marek Behún wrote: > > > > > > On Thu, 21 Oct 2021 15:25:37 +0200 > > > Marek Behún wrote: > > > > > > > Hello, > > > > > >

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Tom Rini
On Thu, Oct 21, 2021 at 09:59:38AM -0600, Simon Glass wrote: > Hi Marek, > > On Thu, 21 Oct 2021 at 07:28, Marek Behún wrote: > > > > On Thu, 21 Oct 2021 15:25:37 +0200 > > Marek Behún wrote: > > > > > Hello, > > > > > > On Thu, 21 Oct 2021 15:06:51 +0200 > > > Wolfgang Denk wrote: > > > > > >

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Simon Glass
Hi Marek, On Thu, 21 Oct 2021 at 07:28, Marek Behún wrote: > > On Thu, 21 Oct 2021 15:25:37 +0200 > Marek Behún wrote: > > > Hello, > > > > On Thu, 21 Oct 2021 15:06:51 +0200 > > Wolfgang Denk wrote: > > > > > I confirm that '+=' looks better. But '+=" is technically broken. > > > > a bit of

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Tom Rini
On Thu, Oct 21, 2021 at 05:12:26PM +0200, Wolfgang Denk wrote: > Dear Marek, > > In message <20211021152831.15524883@thinkpad> you wrote: > > > > > > > I think =+ will confuse far more people than + as last character of var > > I still fail to see why '=+' could be confusing if properly >

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Wolfgang Denk
Dear Marek, In message <20211021152831.15524883@thinkpad> you wrote: > > > > I think =+ will confuse far more people than + as last character of var I still fail to see why '=+' could be confusing if properly documented to be the append operator. I mean, it is not a new invention of mine.

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Marek Behún
On Thu, 21 Oct 2021 15:25:37 +0200 Marek Behún wrote: > Hello, > > On Thu, 21 Oct 2021 15:06:51 +0200 > Wolfgang Denk wrote: > > > I confirm that '+=' looks better. But '+=" is technically broken. > > a bit of my opinion: > I think =+ will confuse far more people than + as last character

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Marek Behún
Hello, On Thu, 21 Oct 2021 15:06:51 +0200 Wolfgang Denk wrote: > I confirm that '+=' looks better. But '+=" is technically broken. a bit of my opinion: I think =+ will confuse far more people than + as last character of var name working weirdly. But I also think that + should be supported as

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Wolfgang Denk
Dear Tom, In message <20211021122325.GX7964@bill-the-cat> you wrote: > > Do you have any other feedback on the entire rest of the series? I already wrote that I support the concept, and the few nit I saw have been fixed, I think. Except this unneeded breaking of backward compatibility. >

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Tom Rini
On Thu, Oct 21, 2021 at 11:50:02AM +0200, Wolfgang Denk wrote: > Dear Simon, > > In message > <20211019164418.v9.3.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> you > wrote: > > At present U-Boot environment variables, and thus scripts, are defined > > by CONFIG_EXTRA_ENV_SETTINGS. It is

Re: [PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-21 Thread Wolfgang Denk
Dear Simon, In message <20211019164418.v9.3.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> you wrote: > At present U-Boot environment variables, and thus scripts, are defined > by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > to this file and dealing with quoting

[PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

2021-10-19 Thread Simon Glass
At present U-Boot environment variables, and thus scripts, are defined by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text to this file and dealing with quoting and newlines is harder than it should be. It would be better if we could just type the script into a text file and