From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mail.openembedded.org (Postfix) with ESMTP id 303B46C45D for ; Thu, 6 Dec 2018 08:15:18 +0000 (UTC) Received: by mail-wm1-f54.google.com with SMTP id c126so39700wmh.0 for ; Thu, 06 Dec 2018 00:15:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dVe/T3JN1jZp+t1NPl4OQ8ZJCYv1qTNUSD2XSTAEAxE=; b=lPvImgs0+tbCjUI3XKPgpQNSpKprW06VH2EsjRZqTE+Mi47Hz8wfU+gLClUZ1ELHdc 9Ro7a4LytIfofkvwX5YOM2TW99agabI5A2rAgbLMW26S64Y9Rrxwl1QTU51KWBt3c2Yw Ia+3TAKwK872ygo+Vkub5AGlCoL0hwFS1z0oMPZKuYAiBM0oq8Jp2/C8hzCy4UZiE8Qt 1RishKA8w27h1qY9/Iu5RssxpN32MagfyfmfsYGXPuuBO1jdrG2nrorxaUJORzmOpSdW kq+DBaLEF/yQNZcwWN+RPIbrIY+58JG7wIiw3pEzCQiWwVmjhCwGTyX82aE4AnjAYLuw 2T8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dVe/T3JN1jZp+t1NPl4OQ8ZJCYv1qTNUSD2XSTAEAxE=; b=f9gy1dOn+YJFT6uZqpyVYaE3wenhiVPqxWOpBg+icAhton7BEutAC8JmTxzfZYRM7F 0ZEmmotJTKrBFM5UqSsFXqfngXnKQpGe5JE2m8wJLI2LKdWGUWo8IWqHmPD1rSCNc+uc c4uQsJnOFxpNYkqGGgnv7n5I7Xj6jOLEAZZIVUTj4wONKrjxGkemLcnnIkgu1RDBpcnR riefcowmgcdRYdy6tCcwa6Tj1umJDHIBu2AtV2XBO9frhBO6BF5YNAbRnhy4PuHLBuxV tH5MWVyduZdIb+O04cE4GugwxgqjIIS6ahUtF/hPEha5cLYRNj+4oj3i7dycxIkN1adg l8gg== X-Gm-Message-State: AA+aEWb3zGDqeXs6H70PbS2MwXxxFCMbzzgzxDlYovNxjK4Nz5Uasp1j 0TSpYdpQgz28vZ1T8bp2vmZ6JiXvxY0+tbfmtPg= X-Google-Smtp-Source: AFSGD/UKaZ5ThDp4+BJYRCBlw29K2rFUGLGiqywJkMEtNmLSwSVkeP+89hqjUdHa7xHYJ/T6bSTDv/roXVxbhA1KDP4= X-Received: by 2002:a1c:44d6:: with SMTP id r205mr19370253wma.50.1544084118522; Thu, 06 Dec 2018 00:15:18 -0800 (PST) MIME-Version: 1.0 References: <85fe4df7c0ce3e3c8017fbf410d98498669f7363.1542971171.git.liezhi.yang@windriver.com> <01bf1405-68d4-59c1-bb14-c12e7d75cd7b@windriver.com> In-Reply-To: <01bf1405-68d4-59c1-bb14-c12e7d75cd7b@windriver.com> From: Martin Jansa Date: Thu, 6 Dec 2018 09:15:06 +0100 Message-ID: To: Robert Yang Cc: Patches and discussions about the oe-core layer Subject: Re: [PATCH 1/1] uboot-sign.bbclass: Remove tab indentations in python code X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Dec 2018 08:15:18 -0000 Content-Type: multipart/alternative; boundary="000000000000634ff9057c561958" --000000000000634ff9057c561958 Content-Type: text/plain; charset="UTF-8" > So I think that shell code can use either spaces or tabs as indentation. True, that's why I used "I wish" and ":)" because as Christmas gift I always wanted consistency (not only between layers, but between shell and python code as well). On Thu, Dec 6, 2018 at 3:55 AM Robert Yang wrote: > 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 > > : python should use 4 spaces indentation, but > found > > tabs in 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 > > wrote: > > > > Use 4 spaces to replace a tab. > > > > Signed-off-by: Robert Yang > > > > --- > > 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 > > > > http://lists.openembedded.org/mailman/listinfo/openembedded-core > > > --000000000000634ff9057c561958 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> So I think that shell code can use either spaces or t= abs as indentation.

True, that's why I used "I = wish" and ":)" because as Christmas gift I always wanted con= sistency (not only between layers, but between shell and python code as wel= l).

On Thu, = Dec 6, 2018 at 3:55 AM Robert Yang <liezhi.yang@windriver.com> wrote:
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/Styl= eguide#Format_Guidelines

- Python functions must be four space indented - no tabs.
- Shell functions in OE-Core usually use tabs for indentation, but other la= yers
usually use consistent indentation with 4 spaces (in shell functions, pytho= n
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 indentat= ion, 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://list= s.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:
>
>=C2=A0 =C2=A0 =C2=A0Use 4 spaces to replace a tab.
>
>=C2=A0 =C2=A0 =C2=A0Signed-off-by: Robert Yang <liezhi.yang@windriver.com >=C2=A0 =C2=A0 =C2=A0<mailto:liezhi.yang@windriver.com>>
>=C2=A0 =C2=A0 =C2=A0---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0meta/classes/uboot-sign.bbclass | 16 +++++++= +--------
>=C2=A0 =C2=A0 =C2=A0 =C2=A01 file changed, 8 insertions(+), 8 deletions= (-)
>
>=C2=A0 =C2=A0 =C2=A0diff --git a/meta/classes/uboot-sign.bbclass b/meta= /classes/uboot-sign.bbclass
>=C2=A0 =C2=A0 =C2=A0index 0e5e1b1..03100b8 100644
>=C2=A0 =C2=A0 =C2=A0--- a/meta/classes/uboot-sign.bbclass
>=C2=A0 =C2=A0 =C2=A0+++ b/meta/classes/uboot-sign.bbclass
>=C2=A0 =C2=A0 =C2=A0@@ -93,14 +93,14 @@ do_install_append() {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0}
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0python () {
>=C2=A0 =C2=A0 =C2=A0-=C2=A0 =C2=A0 =C2=A0 =C2=A0if d.getVar('UBOOT_= SIGN_ENABLE') =3D=3D '1' and d.getVar('PN') =3D=3D
>=C2=A0 =C2=A0 =C2=A0d.getVar('UBOOT_PN'):
>=C2=A0 =C2=A0 =C2=A0-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0kernel_pn =3D d.getVar('PREFERRED_PROVIDER_virtual/kernel') >=C2=A0 =C2=A0 =C2=A0+=C2=A0 =C2=A0 if d.getVar('UBOOT_SIGN_ENABLE&#= 39;) =3D=3D '1' and d.getVar('PN') =3D=3D
>=C2=A0 =C2=A0 =C2=A0d.getVar('UBOOT_PN'):
>=C2=A0 =C2=A0 =C2=A0+=C2=A0 =C2=A0 =C2=A0 =C2=A0 kernel_pn =3D d.getVar= ('PREFERRED_PROVIDER_virtual/kernel')
>
>=C2=A0 =C2=A0 =C2=A0-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0# Make "bitbake u-boot -cdeploy" deploys the signed u-boot.= dtb
>=C2=A0 =C2=A0 =C2=A0-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0d.appendVarFlag('do_deploy', 'depends', ' %s:do_d= eploy' %
>=C2=A0 =C2=A0 =C2=A0kernel_pn)
>=C2=A0 =C2=A0 =C2=A0+=C2=A0 =C2=A0 =C2=A0 =C2=A0 # Make "bitbake u= -boot -cdeploy" deploys the signed u-boot.dtb
>=C2=A0 =C2=A0 =C2=A0+=C2=A0 =C2=A0 =C2=A0 =C2=A0 d.appendVarFlag('d= o_deploy', 'depends', ' %s:do_deploy' % kernel_pn)
>
>=C2=A0 =C2=A0 =C2=A0-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0# kernerl's do_deploy is a litle special, so we can't use
>=C2=A0 =C2=A0 =C2=A0-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0# do_deploy_append, otherwise it would override
>=C2=A0 =C2=A0 =C2=A0-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0# kernel_do_deploy.
>=C2=A0 =C2=A0 =C2=A0-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0d.appendVarFlag('do_deploy', 'prefuncs', ' concat= _dtb')
>=C2=A0 =C2=A0 =C2=A0+=C2=A0 =C2=A0 =C2=A0 =C2=A0 # kernerl's do_dep= loy is a litle special, so we can't use
>=C2=A0 =C2=A0 =C2=A0+=C2=A0 =C2=A0 =C2=A0 =C2=A0 # do_deploy_append, ot= herwise it would override
>=C2=A0 =C2=A0 =C2=A0+=C2=A0 =C2=A0 =C2=A0 =C2=A0 # kernel_do_deploy. >=C2=A0 =C2=A0 =C2=A0+=C2=A0 =C2=A0 =C2=A0 =C2=A0 d.appendVarFlag('d= o_deploy', 'prefuncs', ' concat_dtb')
>=C2=A0 =C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0--
>=C2=A0 =C2=A0 =C2=A02.7.4
>
>=C2=A0 =C2=A0 =C2=A0--
>=C2=A0 =C2=A0 =C2=A0_______________________________________________
>=C2=A0 =C2=A0 =C2=A0Openembedded-core mailing list
>=C2=A0 =C2=A0 =C2=A0Openembedded-core@lists.openembedded.org
>=C2=A0 =C2=A0 =C2=A0<mailto:Openembedded-core@lists.openembedded.= org>
>=C2=A0 =C2=A0 =C2=A0http://lists= .openembedded.org/mailman/listinfo/openembedded-core
>
--000000000000634ff9057c561958--