Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: Martin Jansa <martin.jansa@gmail.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] uboot-sign.bbclass: Remove tab indentations in python code
Date: Thu, 6 Dec 2018 10:59:13 +0800	[thread overview]
Message-ID: <01bf1405-68d4-59c1-bb14-c12e7d75cd7b@windriver.com> (raw)
In-Reply-To: <CA+chaQegPbZ05LK3ZMNNHDYdjsi4ba-kp4=m3BBj6EbzbaHf8A@mail.gmail.com>

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@windriver.com 
> <mailto:liezhi.yang@windriver.com>> wrote:
> 
>     Use 4 spaces to replace a tab.
> 
>     Signed-off-by: Robert Yang <liezhi.yang@windriver.com
>     <mailto:liezhi.yang@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@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 


  reply	other threads:[~2018-12-06  2:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-23 11:08 [PATCH 0/1] uboot-sign.bbclass: Remove tab indentations in python code Robert Yang
2018-11-23 11:07 ` ✗ patchtest: failure for " Patchwork
2018-11-23 11:08 ` [PATCH 1/1] " Robert Yang
2018-12-05 14:40   ` Martin Jansa
2018-12-06  2:59     ` Robert Yang [this message]
2018-12-06  8:15       ` Martin Jansa

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=01bf1405-68d4-59c1-bb14-c12e7d75cd7b@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.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