diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-22 15:07:34 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-22 15:12:33 +0000 |
commit | e850c53d4d8cb877a704a23f9ce02d6185ba3ffa (patch) | |
tree | b09029d4d8bc8b05343cc9c356cb831e623fafe7 /meta/classes/metadata_scm.bbclass | |
parent | 55989cb509340bd265d0ce0d8bfe849681be4616 (diff) | |
download | openembedded-core-contrib-e850c53d4d8cb877a704a23f9ce02d6185ba3ffa.tar.gz |
metadata_scm: Avoid crashing on new svn version layouts
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>
Diffstat (limited to 'meta/classes/metadata_scm.bbclass')
-rw-r--r-- | meta/classes/metadata_scm.bbclass | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/metadata_scm.bbclass b/meta/classes/metadata_scm.bbclass index 8d3988ace8e..ba0edf9486d 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 |