Re: [OE-core] [PATCH v3 1/6] toolchain-scripts: retab file
On 06/05/2018 05:04 AM, Peter Kjellerstedt wrote: -Original Message- From: Richard Purdie [mailto:richard.pur...@linuxfoundation.org] Sent: den 5 juni 2018 12:37 To: Peter Kjellerstedt ; Martin Kelly ; openembedded-core@lists.openembedded.org Subject: Re: [OE-core] [PATCH v3 1/6] toolchain-scripts: retab file On Tue, 2018-06-05 at 10:09 +, Peter Kjellerstedt wrote: -Original Message- From: openembedded-core-boun...@lists.openembedded.org [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of Martin Kelly Sent: den 5 juni 2018 01:06 To: openembedded-core@lists.openembedded.org Subject: [OE-core] [PATCH v3 1/6] toolchain-scripts: retab file Two functions is uses a mix of spaces and tabs. The rest of the file uses tabs, so switch to tabs uniformly. Signed-off-by: Martin Kelly --- meta/classes/toolchain-scripts.bbclass | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index 71da5e5409..a72436167c 100644 --- a/meta/classes/toolchain-scripts.bbclass +++ b/meta/classes/toolchain-scripts.bbclass @@ -122,7 +122,7 @@ toolchain_create_post_relocate_script() { rm -f $script touch $script -cat >> $script <> $script < This part should be indented using tabs as well. @@ -166,13 +166,13 @@ toolchain_create_sdk_siteconfig () { toolchain_create_sdk_siteconfig[vardepsexclude] = "TOOLCHAIN_CONFIGSITE_SYSROOTCACHE" python __anonymous () { -import oe.classextend -deps = "" -for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE') or "").split(): -deps += " %s:do_populate_sysroot" % dep -for variant in (d.getVar('MULTILIB_VARIANTS') or "").split(): -clsextend = oe.classextend.ClassExtender(variant, d) -newdep = clsextend.extend_name(dep) -deps += " %s:do_populate_sysroot" % newdep -d.appendVarFlag('do_configure', 'depends', deps) + import oe.classextend + deps = "" + for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE') or "").split(): + deps += " %s:do_populate_sysroot" % dep + for variant in (d.getVar('MULTILIB_VARIANTS') or "").split(): + clsextend = oe.classextend.ClassExtender(variant, d) + newdep = clsextend.extend_name(dep) + deps += " %s:do_populate_sysroot" % newdep + d.appendVarFlag('do_configure', 'depends', deps) This is Python code. I believe the OE-Core standard is for Python code to be indented using four spaces (whereas shell code should be indented using tabs). I noticed this last bit and simply dropped that patch hunk. Cheers, Richard You might want to update the commit message then as well, as it refers to the two functions that are modified, which is no longer the case. //Peter Thanks all; good point about Python and the commit message. I thought about using the one-line || version, but like Richard, I find the explicit if statement more readable, and more consistent with what the rest of the function does. -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH v3 1/6] toolchain-scripts: retab file
> -Original Message- > From: Richard Purdie [mailto:richard.pur...@linuxfoundation.org] > Sent: den 5 juni 2018 12:37 > To: Peter Kjellerstedt ; Martin Kelly > ; openembedded-core@lists.openembedded.org > Subject: Re: [OE-core] [PATCH v3 1/6] toolchain-scripts: retab file > > On Tue, 2018-06-05 at 10:09 +, Peter Kjellerstedt wrote: > > > -Original Message- > > > From: openembedded-core-boun...@lists.openembedded.org > > > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf > > > Of > > > Martin Kelly > > > Sent: den 5 juni 2018 01:06 > > > To: openembedded-core@lists.openembedded.org > > > Subject: [OE-core] [PATCH v3 1/6] toolchain-scripts: retab file > > > > > > Two functions is uses a mix of spaces and tabs. The rest of the > > > file > > > uses tabs, so switch to tabs uniformly. > > > > > > Signed-off-by: Martin Kelly > > > --- > > > meta/classes/toolchain-scripts.bbclass | 20 ++-- > > > 1 file changed, 10 insertions(+), 10 deletions(-) > > > > > > diff --git a/meta/classes/toolchain-scripts.bbclass > > > b/meta/classes/toolchain-scripts.bbclass > > > index 71da5e5409..a72436167c 100644 > > > --- a/meta/classes/toolchain-scripts.bbclass > > > +++ b/meta/classes/toolchain-scripts.bbclass > > > @@ -122,7 +122,7 @@ toolchain_create_post_relocate_script() { > > > rm -f $script > > > touch $script > > > > > > -cat >> $script < > > + cat >> $script < > > if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then > > > for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*.sh; do > > > \$s "\$1" > > > > This part should be indented using tabs as well. > > > > > @@ -166,13 +166,13 @@ toolchain_create_sdk_siteconfig () { > > > toolchain_create_sdk_siteconfig[vardepsexclude] = > > > "TOOLCHAIN_CONFIGSITE_SYSROOTCACHE" > > > > > > python __anonymous () { > > > -import oe.classextend > > > -deps = "" > > > -for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE') or > > > "").split(): > > > -deps += " %s:do_populate_sysroot" % dep > > > -for variant in (d.getVar('MULTILIB_VARIANTS') or > > > "").split(): > > > -clsextend = oe.classextend.ClassExtender(variant, d) > > > -newdep = clsextend.extend_name(dep) > > > -deps += " %s:do_populate_sysroot" % newdep > > > -d.appendVarFlag('do_configure', 'depends', deps) > > > + import oe.classextend > > > + deps = "" > > > + for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE') or > > > "").split(): > > > + deps += " %s:do_populate_sysroot" % dep > > > + for variant in (d.getVar('MULTILIB_VARIANTS') or > > > "").split(): > > > + clsextend = > > > oe.classextend.ClassExtender(variant, d) > > > + newdep = clsextend.extend_name(dep) > > > + deps += " %s:do_populate_sysroot" % > newdep > > > + d.appendVarFlag('do_configure', 'depends', deps) > > > > This is Python code. I believe the OE-Core standard is for Python > > code > > to be indented using four spaces (whereas shell code should be > > indented > > using tabs). > > I noticed this last bit and simply dropped that patch hunk. > > Cheers, > > Richard You might want to update the commit message then as well, as it refers to the two functions that are modified, which is no longer the case. //Peter -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH v3 1/6] toolchain-scripts: retab file
On Tue, 2018-06-05 at 10:09 +, Peter Kjellerstedt wrote: > > -Original Message- > > From: openembedded-core-boun...@lists.openembedded.org > > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf > > Of > > Martin Kelly > > Sent: den 5 juni 2018 01:06 > > To: openembedded-core@lists.openembedded.org > > Subject: [OE-core] [PATCH v3 1/6] toolchain-scripts: retab file > > > > Two functions is uses a mix of spaces and tabs. The rest of the > > file > > uses tabs, so switch to tabs uniformly. > > > > Signed-off-by: Martin Kelly > > --- > > meta/classes/toolchain-scripts.bbclass | 20 ++-- > > 1 file changed, 10 insertions(+), 10 deletions(-) > > > > diff --git a/meta/classes/toolchain-scripts.bbclass > > b/meta/classes/toolchain-scripts.bbclass > > index 71da5e5409..a72436167c 100644 > > --- a/meta/classes/toolchain-scripts.bbclass > > +++ b/meta/classes/toolchain-scripts.bbclass > > @@ -122,7 +122,7 @@ toolchain_create_post_relocate_script() { > > rm -f $script > > touch $script > > > > -cat >> $script < > + cat >> $script < > if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then > > for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*.sh; do > > \$s "\$1" > > This part should be indented using tabs as well. > > > @@ -166,13 +166,13 @@ toolchain_create_sdk_siteconfig () { > > toolchain_create_sdk_siteconfig[vardepsexclude] = > > "TOOLCHAIN_CONFIGSITE_SYSROOTCACHE" > > > > python __anonymous () { > > -import oe.classextend > > -deps = "" > > -for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE') or > > "").split(): > > -deps += " %s:do_populate_sysroot" % dep > > -for variant in (d.getVar('MULTILIB_VARIANTS') or > > "").split(): > > -clsextend = oe.classextend.ClassExtender(variant, d) > > -newdep = clsextend.extend_name(dep) > > -deps += " %s:do_populate_sysroot" % newdep > > -d.appendVarFlag('do_configure', 'depends', deps) > > + import oe.classextend > > + deps = "" > > + for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE') or > > "").split(): > > + deps += " %s:do_populate_sysroot" % dep > > + for variant in (d.getVar('MULTILIB_VARIANTS') or > > "").split(): > > + clsextend = > > oe.classextend.ClassExtender(variant, d) > > + newdep = clsextend.extend_name(dep) > > + deps += " %s:do_populate_sysroot" % newdep > > + d.appendVarFlag('do_configure', 'depends', deps) > > This is Python code. I believe the OE-Core standard is for Python > code > to be indented using four spaces (whereas shell code should be > indented > using tabs). I noticed this last bit and simply dropped that patch hunk. Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH v3 1/6] toolchain-scripts: retab file
> -Original Message- > From: openembedded-core-boun...@lists.openembedded.org > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of > Martin Kelly > Sent: den 5 juni 2018 01:06 > To: openembedded-core@lists.openembedded.org > Subject: [OE-core] [PATCH v3 1/6] toolchain-scripts: retab file > > Two functions is uses a mix of spaces and tabs. The rest of the file > uses tabs, so switch to tabs uniformly. > > Signed-off-by: Martin Kelly > --- > meta/classes/toolchain-scripts.bbclass | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/meta/classes/toolchain-scripts.bbclass > b/meta/classes/toolchain-scripts.bbclass > index 71da5e5409..a72436167c 100644 > --- a/meta/classes/toolchain-scripts.bbclass > +++ b/meta/classes/toolchain-scripts.bbclass > @@ -122,7 +122,7 @@ toolchain_create_post_relocate_script() { > rm -f $script > touch $script > > -cat >> $script < + cat >> $script < if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then > for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*.sh; do > \$s "\$1" This part should be indented using tabs as well. > @@ -166,13 +166,13 @@ toolchain_create_sdk_siteconfig () { > toolchain_create_sdk_siteconfig[vardepsexclude] = > "TOOLCHAIN_CONFIGSITE_SYSROOTCACHE" > > python __anonymous () { > -import oe.classextend > -deps = "" > -for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE') or "").split(): > -deps += " %s:do_populate_sysroot" % dep > -for variant in (d.getVar('MULTILIB_VARIANTS') or "").split(): > -clsextend = oe.classextend.ClassExtender(variant, d) > -newdep = clsextend.extend_name(dep) > -deps += " %s:do_populate_sysroot" % newdep > -d.appendVarFlag('do_configure', 'depends', deps) > + import oe.classextend > + deps = "" > + for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE') or "").split(): > + deps += " %s:do_populate_sysroot" % dep > + for variant in (d.getVar('MULTILIB_VARIANTS') or "").split(): > + clsextend = oe.classextend.ClassExtender(variant, d) > + newdep = clsextend.extend_name(dep) > + deps += " %s:do_populate_sysroot" % newdep > + d.appendVarFlag('do_configure', 'depends', deps) This is Python code. I believe the OE-Core standard is for Python code to be indented using four spaces (whereas shell code should be indented using tabs). > } > -- > 2.11.0 //Peter -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v3 1/6] toolchain-scripts: retab file
Two functions is uses a mix of spaces and tabs. The rest of the file uses tabs, so switch to tabs uniformly. Signed-off-by: Martin Kelly --- meta/classes/toolchain-scripts.bbclass | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index 71da5e5409..a72436167c 100644 --- a/meta/classes/toolchain-scripts.bbclass +++ b/meta/classes/toolchain-scripts.bbclass @@ -122,7 +122,7 @@ toolchain_create_post_relocate_script() { rm -f $script touch $script -cat >> $script <> $script