Patchwork [PATCHv2,1/3] sanity: handle both \n and \\n in mirror vars

login
register
mail settings
Submitter Christopher Larson
Date Aug. 25, 2014, 10:57 p.m.
Message ID <483e2f9eb1085db0958bb1ef9184814766bbd214.1409007366.git.chris_larson@mentor.com>
Download mbox | patch
Permalink /patch/78931/
State Accepted
Commit d68255d14bfa43bfa35c724631ab844a141e300e
Headers show

Comments

Christopher Larson - Aug. 25, 2014, 10:57 p.m.
From: Christopher Larson <chris_larson@mentor.com>

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/classes/sanity.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Martin Jansa - Aug. 26, 2014, 10:51 a.m.
On Mon, Aug 25, 2014 at 03:57:42PM -0700, Christopher Larson wrote:
> From: Christopher Larson <chris_larson@mentor.com>
> 
> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
> ---
>  meta/classes/sanity.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index dbcc26b..7cfc4be 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -759,7 +759,7 @@ def check_sanity_everybuild(status, d):
>          'git://', 'gitsm://', 'hg://', 'osc://', 'p4://', 'svk://', 'svn://', \
>          'bzr://', 'cvs://']
>      for mir_type in mir_types:
> -        mirros = (d.getVar(mir_type, True) or '').split('\\n')
> +        mirros = (d.getVar(mir_type, True) or '').replace('\\n', '\n').split('\n')

Would you mind fixing the typo in variable name as well?

>          for mir in mirros:
>              mir_list = mir.split()
>              # Should be two members.
> -- 
> 1.8.3.4
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Martin Jansa - Aug. 26, 2014, 10:59 a.m.
On Tue, Aug 26, 2014 at 12:51:49PM +0200, Martin Jansa wrote:
> On Mon, Aug 25, 2014 at 03:57:42PM -0700, Christopher Larson wrote:
> > From: Christopher Larson <chris_larson@mentor.com>
> > 
> > Signed-off-by: Christopher Larson <chris_larson@mentor.com>
> > ---
> >  meta/classes/sanity.bbclass | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> > index dbcc26b..7cfc4be 100644
> > --- a/meta/classes/sanity.bbclass
> > +++ b/meta/classes/sanity.bbclass
> > @@ -759,7 +759,7 @@ def check_sanity_everybuild(status, d):
> >          'git://', 'gitsm://', 'hg://', 'osc://', 'p4://', 'svk://', 'svn://', \
> >          'bzr://', 'cvs://']
> >      for mir_type in mir_types:
> > -        mirros = (d.getVar(mir_type, True) or '').split('\\n')
> > +        mirros = (d.getVar(mir_type, True) or '').replace('\\n', '\n').split('\n')
> 
> Would you mind fixing the typo in variable name as well?

Nevermind, it's refactored in 3/3, sorry for noise.

> >          for mir in mirros:
> >              mir_list = mir.split()
> >              # Should be two members.
> > -- 
> > 1.8.3.4
> > 
> > -- 
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
Koen Kooi - Aug. 27, 2014, 11:50 a.m.
Op 26 aug. 2014, om 00:57 heeft Christopher Larson <kergoth@gmail.com> het volgende geschreven:

> From: Christopher Larson <chris_larson@mentor.com>
> 
> Signed-off-by: Christopher Larson <chris_larson@mentor.com>

Tested-by: Koen Kooi <koen@dominion.thruhere.net>

> ---
> meta/classes/sanity.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index dbcc26b..7cfc4be 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -759,7 +759,7 @@ def check_sanity_everybuild(status, d):
>         'git://', 'gitsm://', 'hg://', 'osc://', 'p4://', 'svk://', 'svn://', \
>         'bzr://', 'cvs://']
>     for mir_type in mir_types:
> -        mirros = (d.getVar(mir_type, True) or '').split('\\n')
> +        mirros = (d.getVar(mir_type, True) or '').replace('\\n', '\n').split('\n')
>         for mir in mirros:
>             mir_list = mir.split()
>             # Should be two members.
> -- 
> 1.8.3.4
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

Patch

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index dbcc26b..7cfc4be 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -759,7 +759,7 @@  def check_sanity_everybuild(status, d):
         'git://', 'gitsm://', 'hg://', 'osc://', 'p4://', 'svk://', 'svn://', \
         'bzr://', 'cvs://']
     for mir_type in mir_types:
-        mirros = (d.getVar(mir_type, True) or '').split('\\n')
+        mirros = (d.getVar(mir_type, True) or '').replace('\\n', '\n').split('\n')
         for mir in mirros:
             mir_list = mir.split()
             # Should be two members.