From 01a393838b0e87cde07a81068965064e858c9155 Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Mon, 16 Mar 2009 18:36:22 -0400 Subject: base.bbclass: fix base_get_scmbasepath() to look for recipes/ and fall back to packages/ while parsing BBFILES Signed-off-by: Denys Dmytriyenko Acked-by: Mike Westerhof Acked-by: Philip Balister Acked-by: Khem Raj Acked-by: Marcin Juszkiewicz Acked-by: Koen Kooi Acked-by: Frans Meulenbroeks --- classes/base.bbclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 18afc1a2fe..0848870803 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -773,7 +773,13 @@ python base_do_unpack() { def base_get_scmbasepath(d): import bb path_to_bbfiles = bb.data.getVar( 'BBFILES', d, 1 ).split() - return path_to_bbfiles[0][:path_to_bbfiles[0].rindex( "packages" )] + + try: + index = path_to_bbfiles[0].rindex( "recipes" ) + except ValueError: + index = path_to_bbfiles[0].rindex( "packages" ) + + return path_to_bbfiles[0][:index] def base_get_metadata_monotone_branch(d): monotone_branch = "" -- cgit v1.2.3