Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] metadata_scm: Avoid crashing on new svn version layouts
@ 2013-11-22 15:07 Richard Purdie
  2013-11-22 18:49 ` Otavio Salvador
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2013-11-22 15:07 UTC (permalink / raw)
  To: openembedded-core

This avoids crashing on newer svn layouts where the entries files
don't contain three lines. If someone wants to fix this to
get the right version on newer subversion checkouts, patches
welcome but this at least stops things crashing.

[YOCTO #5363]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/metadata_scm.bbclass b/meta/classes/metadata_scm.bbclass
index 8d3988a..ba0edf9 100644
--- a/meta/classes/metadata_scm.bbclass
+++ b/meta/classes/metadata_scm.bbclass
@@ -54,11 +54,13 @@ def base_get_metadata_monotone_revision(path, d):
     return monotone_revision
 
 def base_get_metadata_svn_revision(path, d):
+    # This only works with older subversion. For newer versions 
+    # this function will need to be fixed by someone interested
     revision = "<unknown>"
     try:
         with open("%s/.svn/entries" % path) as f:
             revision = f.readlines()[3].strip()
-    except IOError:
+    except IOError, IndexError:
         pass
     return revision
 




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] metadata_scm: Avoid crashing on new svn version layouts
  2013-11-22 15:07 [PATCH] metadata_scm: Avoid crashing on new svn version layouts Richard Purdie
@ 2013-11-22 18:49 ` Otavio Salvador
  2013-11-22 23:17   ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Otavio Salvador @ 2013-11-22 18:49 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Fri, Nov 22, 2013 at 1:07 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> This avoids crashing on newer svn layouts where the entries files
> don't contain three lines. If someone wants to fix this to
> get the right version on newer subversion checkouts, patches
> welcome but this at least stops things crashing.
>
> [YOCTO #5363]
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Does not seem right to 'workaround' this; it'd be better to fix it properly.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] metadata_scm: Avoid crashing on new svn version layouts
  2013-11-22 18:49 ` Otavio Salvador
@ 2013-11-22 23:17   ` Richard Purdie
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2013-11-22 23:17 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: openembedded-core

On Fri, 2013-11-22 at 16:49 -0200, Otavio Salvador wrote:
> On Fri, Nov 22, 2013 at 1:07 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > This avoids crashing on newer svn layouts where the entries files
> > don't contain three lines. If someone wants to fix this to
> > get the right version on newer subversion checkouts, patches
> > welcome but this at least stops things crashing.
> >
> > [YOCTO #5363]
> >
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> 
> Does not seem right to 'workaround' this; it'd be better to fix it properly.

Its bad the system completely crashes and this patch improves/removes
that particular problem.

Equally, I don't have any inclination to figure out the svn changes, I
also don't know anyone with any interest in figuring out svn changes.
This has been broken long enough that I don't think many people can be
using it. If people are, they will fix it...

Cheers,

Richard



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-22 23:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-22 15:07 [PATCH] metadata_scm: Avoid crashing on new svn version layouts Richard Purdie
2013-11-22 18:49 ` Otavio Salvador
2013-11-22 23:17   ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox