mbox series

[oe-layersetup,00/15] Sacrifice your first born to the linter

Message ID 20230607200504.3810426-1-rs@ti.com
Headers show
Series Sacrifice your first born to the linter | expand

Message

Randolph Sapp June 7, 2023, 8:04 p.m. UTC
From: Randolph Sapp <rs@ti.com>

Last night someone in the beagle community reported some cryptic errors from
oe-layersetup so I took the time to address all of the issues reported
by Shellcheck and add some extra sanity checks.

I tried to split it into reasonable segments.

StaticRocket (15):
  oe-layertool-setup: prefer use of $() notation
  oe-layertool-setup: replace all x comparisons with -n/-z
  oe-layertool-setup: fix all the printf calls
  oe-layertool-setup: fix all quoting, switch eval to export
  oe-layertool-setup: only invoke read with -r
  oe-layertool-setup: check exit code directly
  oe-layertool-setup: guard all cd calls
  oe-layertool-setup: eliminate useless cat
  oe-layertool-setup: use subshell execution with redirect
  oe-layertool-setup: guard against invalid expression in case
  oe-layertool-setup: replace all calls to echo with printf
  oe-layertool-setup: drop unused variable
  oe-layertool-setup: add a path sanity check for oebase
  oe-layertool-setup: fix multi-line printfs
  oe-layertool-setup: add sanity check for layer names

 oe-layertool-setup.sh | 435 +++++++++++++++++++++---------------------
 1 file changed, 220 insertions(+), 215 deletions(-)

Comments

Denys Dmytriyenko June 8, 2023, 5:48 p.m. UTC | #1
Do you need to correct From: and SoB: lines in all the patches?


On Wed, Jun 07, 2023 at 03:04:49PM -0500, rs@ti.com wrote:
> From: Randolph Sapp <rs@ti.com>
> 
> Last night someone in the beagle community reported some cryptic errors from
> oe-layersetup so I took the time to address all of the issues reported
> by Shellcheck and add some extra sanity checks.
> 
> I tried to split it into reasonable segments.
> 
> StaticRocket (15):
>   oe-layertool-setup: prefer use of $() notation
>   oe-layertool-setup: replace all x comparisons with -n/-z
>   oe-layertool-setup: fix all the printf calls
>   oe-layertool-setup: fix all quoting, switch eval to export
>   oe-layertool-setup: only invoke read with -r
>   oe-layertool-setup: check exit code directly
>   oe-layertool-setup: guard all cd calls
>   oe-layertool-setup: eliminate useless cat
>   oe-layertool-setup: use subshell execution with redirect
>   oe-layertool-setup: guard against invalid expression in case
>   oe-layertool-setup: replace all calls to echo with printf
>   oe-layertool-setup: drop unused variable
>   oe-layertool-setup: add a path sanity check for oebase
>   oe-layertool-setup: fix multi-line printfs
>   oe-layertool-setup: add sanity check for layer names
> 
>  oe-layertool-setup.sh | 435 +++++++++++++++++++++---------------------
>  1 file changed, 220 insertions(+), 215 deletions(-)
> 
> -- 
> 2.40.1
Randolph Sapp June 8, 2023, 6:13 p.m. UTC | #2
On 6/8/23 12:48, Denys Dmytriyenko wrote:
> Do you need to correct From: and SoB: lines in all the patches?
> 

I don't know, do I? I did this work at home at 5AM with my personal 
machine, hence my personal account being the author, signer, and sender. 
If you need me to change it I can.

> 
> On Wed, Jun 07, 2023 at 03:04:49PM -0500, rs@ti.com wrote:
>> From: Randolph Sapp <rs@ti.com>
>>
>> Last night someone in the beagle community reported some cryptic errors from
>> oe-layersetup so I took the time to address all of the issues reported
>> by Shellcheck and add some extra sanity checks.
>>
>> I tried to split it into reasonable segments.
>>
>> StaticRocket (15):
>>    oe-layertool-setup: prefer use of $() notation
>>    oe-layertool-setup: replace all x comparisons with -n/-z
>>    oe-layertool-setup: fix all the printf calls
>>    oe-layertool-setup: fix all quoting, switch eval to export
>>    oe-layertool-setup: only invoke read with -r
>>    oe-layertool-setup: check exit code directly
>>    oe-layertool-setup: guard all cd calls
>>    oe-layertool-setup: eliminate useless cat
>>    oe-layertool-setup: use subshell execution with redirect
>>    oe-layertool-setup: guard against invalid expression in case
>>    oe-layertool-setup: replace all calls to echo with printf
>>    oe-layertool-setup: drop unused variable
>>    oe-layertool-setup: add a path sanity check for oebase
>>    oe-layertool-setup: fix multi-line printfs
>>    oe-layertool-setup: add sanity check for layer names
>>
>>   oe-layertool-setup.sh | 435 +++++++++++++++++++++---------------------
>>   1 file changed, 220 insertions(+), 215 deletions(-)
>>
>> -- 
>> 2.40.1
Denys Dmytriyenko June 8, 2023, 6:31 p.m. UTC | #3
On Thu, Jun 08, 2023 at 01:13:32PM -0500, Randolph Sapp via lists.yoctoproject.org wrote:
> On 6/8/23 12:48, Denys Dmytriyenko wrote:
> >Do you need to correct From: and SoB: lines in all the patches?
> 
> I don't know, do I? I did this work at home at 5AM with my personal
> machine, hence my personal account being the author, signer, and
> sender. If you need me to change it I can.

For the most part I don't care, was just checking it wasn't an oversight.


> >On Wed, Jun 07, 2023 at 03:04:49PM -0500, rs@ti.com wrote:
> >>From: Randolph Sapp <rs@ti.com>
> >>
> >>Last night someone in the beagle community reported some cryptic errors from
> >>oe-layersetup so I took the time to address all of the issues reported
> >>by Shellcheck and add some extra sanity checks.
> >>
> >>I tried to split it into reasonable segments.
> >>
> >>StaticRocket (15):
> >>   oe-layertool-setup: prefer use of $() notation
> >>   oe-layertool-setup: replace all x comparisons with -n/-z
> >>   oe-layertool-setup: fix all the printf calls
> >>   oe-layertool-setup: fix all quoting, switch eval to export
> >>   oe-layertool-setup: only invoke read with -r
> >>   oe-layertool-setup: check exit code directly
> >>   oe-layertool-setup: guard all cd calls
> >>   oe-layertool-setup: eliminate useless cat
> >>   oe-layertool-setup: use subshell execution with redirect
> >>   oe-layertool-setup: guard against invalid expression in case
> >>   oe-layertool-setup: replace all calls to echo with printf
> >>   oe-layertool-setup: drop unused variable
> >>   oe-layertool-setup: add a path sanity check for oebase
> >>   oe-layertool-setup: fix multi-line printfs
> >>   oe-layertool-setup: add sanity check for layer names
> >>
> >>  oe-layertool-setup.sh | 435 +++++++++++++++++++++---------------------
> >>  1 file changed, 220 insertions(+), 215 deletions(-)
> >>
> >>-- 
> >>2.40.1
Andrew Davis June 8, 2023, 6:32 p.m. UTC | #4
On 6/8/23 1:13 PM, Randolph Sapp wrote:
> On 6/8/23 12:48, Denys Dmytriyenko wrote:
>> Do you need to correct From: and SoB: lines in all the patches?
>>
> 
> I don't know, do I? I did this work at home at 5AM with my personal machine, hence my personal account being the author, signer, and sender. If you need me to change it I can.
> 

Probably fine to use your personal email if you did this completely outside the context of work,
but also assuming your personal email isn't "35777938+StaticRocket@users.noreply.github.com"..

Andrew

>>
>> On Wed, Jun 07, 2023 at 03:04:49PM -0500, rs@ti.com wrote:
>>> From: Randolph Sapp <rs@ti.com>
>>>
>>> Last night someone in the beagle community reported some cryptic errors from
>>> oe-layersetup so I took the time to address all of the issues reported
>>> by Shellcheck and add some extra sanity checks.
>>>
>>> I tried to split it into reasonable segments.
>>>
>>> StaticRocket (15):
>>>    oe-layertool-setup: prefer use of $() notation
>>>    oe-layertool-setup: replace all x comparisons with -n/-z
>>>    oe-layertool-setup: fix all the printf calls
>>>    oe-layertool-setup: fix all quoting, switch eval to export
>>>    oe-layertool-setup: only invoke read with -r
>>>    oe-layertool-setup: check exit code directly
>>>    oe-layertool-setup: guard all cd calls
>>>    oe-layertool-setup: eliminate useless cat
>>>    oe-layertool-setup: use subshell execution with redirect
>>>    oe-layertool-setup: guard against invalid expression in case
>>>    oe-layertool-setup: replace all calls to echo with printf
>>>    oe-layertool-setup: drop unused variable
>>>    oe-layertool-setup: add a path sanity check for oebase
>>>    oe-layertool-setup: fix multi-line printfs
>>>    oe-layertool-setup: add sanity check for layer names
>>>
>>>   oe-layertool-setup.sh | 435 +++++++++++++++++++++---------------------
>>>   1 file changed, 220 insertions(+), 215 deletions(-)
>>>
>>> -- 
>>> 2.40.1
>
Randolph Sapp June 8, 2023, 6:48 p.m. UTC | #5
On 6/8/23 13:32, Andrew Davis wrote:
> On 6/8/23 1:13 PM, Randolph Sapp wrote:
>> On 6/8/23 12:48, Denys Dmytriyenko wrote:
>>> Do you need to correct From: and SoB: lines in all the patches?
>>>
>>
>> I don't know, do I? I did this work at home at 5AM with my personal 
>> machine, hence my personal account being the author, signer, and 
>> sender. If you need me to change it I can.
>>
> 
> Probably fine to use your personal email if you did this completely 
> outside the context of work,
> but also assuming your personal email isn't 
> "35777938+StaticRocket@users.noreply.github.com"..
> 
> Andrew

Nah, I've had a long history of obscuring my personal email. Should 
probably make a secondary account for stuff now that I'm actually 
participating in mailing list related development. Or just give up the 
sentiment of a private email address completely. Eh, whatever.

> 
>>>
>>> On Wed, Jun 07, 2023 at 03:04:49PM -0500, rs@ti.com wrote:
>>>> From: Randolph Sapp <rs@ti.com>
>>>>
>>>> Last night someone in the beagle community reported some cryptic 
>>>> errors from
>>>> oe-layersetup so I took the time to address all of the issues reported
>>>> by Shellcheck and add some extra sanity checks.
>>>>
>>>> I tried to split it into reasonable segments.
>>>>
>>>> StaticRocket (15):
>>>>    oe-layertool-setup: prefer use of $() notation
>>>>    oe-layertool-setup: replace all x comparisons with -n/-z
>>>>    oe-layertool-setup: fix all the printf calls
>>>>    oe-layertool-setup: fix all quoting, switch eval to export
>>>>    oe-layertool-setup: only invoke read with -r
>>>>    oe-layertool-setup: check exit code directly
>>>>    oe-layertool-setup: guard all cd calls
>>>>    oe-layertool-setup: eliminate useless cat
>>>>    oe-layertool-setup: use subshell execution with redirect
>>>>    oe-layertool-setup: guard against invalid expression in case
>>>>    oe-layertool-setup: replace all calls to echo with printf
>>>>    oe-layertool-setup: drop unused variable
>>>>    oe-layertool-setup: add a path sanity check for oebase
>>>>    oe-layertool-setup: fix multi-line printfs
>>>>    oe-layertool-setup: add sanity check for layer names
>>>>
>>>>   oe-layertool-setup.sh | 435 
>>>> +++++++++++++++++++++---------------------
>>>>   1 file changed, 220 insertions(+), 215 deletions(-)
>>>>
>>>> -- 
>>>> 2.40.1
>>
Ryan Eatmon June 9, 2023, 1:47 p.m. UTC | #6
On 6/8/2023 1:48 PM, Randolph Sapp wrote:
> On 6/8/23 13:32, Andrew Davis wrote:
>> On 6/8/23 1:13 PM, Randolph Sapp wrote:
>>> On 6/8/23 12:48, Denys Dmytriyenko wrote:
>>>> Do you need to correct From: and SoB: lines in all the patches?
>>>>
>>>
>>> I don't know, do I? I did this work at home at 5AM with my personal 
>>> machine, hence my personal account being the author, signer, and 
>>> sender. If you need me to change it I can.
>>>
>>
>> Probably fine to use your personal email if you did this completely 
>> outside the context of work,
>> but also assuming your personal email isn't 
>> "35777938+StaticRocket@users.noreply.github.com"..
>>
>> Andrew
> 
> Nah, I've had a long history of obscuring my personal email. Should 
> probably make a secondary account for stuff now that I'm actually 
> participating in mailing list related development. Or just give up the 
> sentiment of a private email address completely. Eh, whatever.

I would prefer you to use a more "stable" personal email address...


>>
>>>>
>>>> On Wed, Jun 07, 2023 at 03:04:49PM -0500, rs@ti.com wrote:
>>>>> From: Randolph Sapp <rs@ti.com>
>>>>>
>>>>> Last night someone in the beagle community reported some cryptic 
>>>>> errors from
>>>>> oe-layersetup so I took the time to address all of the issues reported
>>>>> by Shellcheck and add some extra sanity checks.
>>>>>
>>>>> I tried to split it into reasonable segments.
>>>>>
>>>>> StaticRocket (15):
>>>>>    oe-layertool-setup: prefer use of $() notation
>>>>>    oe-layertool-setup: replace all x comparisons with -n/-z
>>>>>    oe-layertool-setup: fix all the printf calls
>>>>>    oe-layertool-setup: fix all quoting, switch eval to export
>>>>>    oe-layertool-setup: only invoke read with -r
>>>>>    oe-layertool-setup: check exit code directly
>>>>>    oe-layertool-setup: guard all cd calls
>>>>>    oe-layertool-setup: eliminate useless cat
>>>>>    oe-layertool-setup: use subshell execution with redirect
>>>>>    oe-layertool-setup: guard against invalid expression in case
>>>>>    oe-layertool-setup: replace all calls to echo with printf
>>>>>    oe-layertool-setup: drop unused variable
>>>>>    oe-layertool-setup: add a path sanity check for oebase
>>>>>    oe-layertool-setup: fix multi-line printfs
>>>>>    oe-layertool-setup: add sanity check for layer names
>>>>>
>>>>>   oe-layertool-setup.sh | 435 
>>>>> +++++++++++++++++++++---------------------
>>>>>   1 file changed, 220 insertions(+), 215 deletions(-)
>>>>>
>>>>> -- 
>>>>> 2.40.1
>>>
>