[OE-core] [PATCH 1/1] uboot-sign.bbclass: Remove tab indentations in python code

Robert Yang liezhi.yang at windriver.com
Thu Dec 6 02:59:13 UTC 2018


Hi Martin,

On 12/5/18 10:40 PM, Martin Jansa wrote:
> I wish we could have the same warning for shell code as well :).
>

According to oe's Format Guidelines:

https://www.openembedded.org/wiki/Styleguide#Format_Guidelines

- Python functions must be four space indented - no tabs.
- Shell functions in OE-Core usually use tabs for indentation, but other layers 
usually use consistent indentation with 4 spaces (in shell functions, python 
functions and for indentation of multi-line variables)


So I think that shell code can use either spaces or tabs as indentation.

> Can you please take care of meta-gplv2 as well?
> WARNING: meta-gplv2/recipes-core/coreutils/coreutils_6.9.bb 
> <http://coreutils_6.9.bb>: python should use 4 spaces indentation, but found 
> tabs in coreutils_6.9.bb <http://coreutils_6.9.bb>, line 95

Thanks, I've sent a patch for it.

// Robert

> 
> I've sent patch for meta-oe issue:
> http://lists.openembedded.org/pipermail/openembedded-devel/2018-December/197803.html
> 
> 
> On Fri, Nov 23, 2018 at 11:51 AM Robert Yang <liezhi.yang at windriver.com 
> <mailto:liezhi.yang at windriver.com>> wrote:
> 
>     Use 4 spaces to replace a tab.
> 
>     Signed-off-by: Robert Yang <liezhi.yang at windriver.com
>     <mailto:liezhi.yang at windriver.com>>
>     ---
>       meta/classes/uboot-sign.bbclass | 16 ++++++++--------
>       1 file changed, 8 insertions(+), 8 deletions(-)
> 
>     diff --git a/meta/classes/uboot-sign.bbclass b/meta/classes/uboot-sign.bbclass
>     index 0e5e1b1..03100b8 100644
>     --- a/meta/classes/uboot-sign.bbclass
>     +++ b/meta/classes/uboot-sign.bbclass
>     @@ -93,14 +93,14 @@ do_install_append() {
>       }
> 
>       python () {
>     -       if d.getVar('UBOOT_SIGN_ENABLE') == '1' and d.getVar('PN') ==
>     d.getVar('UBOOT_PN'):
>     -               kernel_pn = d.getVar('PREFERRED_PROVIDER_virtual/kernel')
>     +    if d.getVar('UBOOT_SIGN_ENABLE') == '1' and d.getVar('PN') ==
>     d.getVar('UBOOT_PN'):
>     +        kernel_pn = d.getVar('PREFERRED_PROVIDER_virtual/kernel')
> 
>     -               # Make "bitbake u-boot -cdeploy" deploys the signed u-boot.dtb
>     -               d.appendVarFlag('do_deploy', 'depends', ' %s:do_deploy' %
>     kernel_pn)
>     +        # Make "bitbake u-boot -cdeploy" deploys the signed u-boot.dtb
>     +        d.appendVarFlag('do_deploy', 'depends', ' %s:do_deploy' % kernel_pn)
> 
>     -               # kernerl's do_deploy is a litle special, so we can't use
>     -               # do_deploy_append, otherwise it would override
>     -               # kernel_do_deploy.
>     -               d.appendVarFlag('do_deploy', 'prefuncs', ' concat_dtb')
>     +        # kernerl's do_deploy is a litle special, so we can't use
>     +        # do_deploy_append, otherwise it would override
>     +        # kernel_do_deploy.
>     +        d.appendVarFlag('do_deploy', 'prefuncs', ' concat_dtb')
>       }
>     -- 
>     2.7.4
> 
>     -- 
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core at lists.openembedded.org
>     <mailto:Openembedded-core at lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 


More information about the Openembedded-core mailing list