Patchwork [CONSOLIDATED,PULL,19/19] utils.bbclass: skip empty paths when handling FILESEXTRAPATHS

login
register
mail settings
Submitter Saul Wold
Date Aug. 22, 2011, 9:52 p.m.
Message ID <9037f676920bbb10ba4db7f21a4b2d634d02f124.1314043945.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/10439/
State New, archived
Headers show

Comments

Saul Wold - Aug. 22, 2011, 9:52 p.m.
From: Martin Jansa <Martin.Jansa@gmail.com>

* if there is multiple .bbappend files with FILESEXTRAPATHS_prepend := "/:"
  then the one parsed last is causing trailing ':' and that's causing empty element in
  path = extrapaths.split(:) + path
* it's hard to keep all .bbappends from foreign layers to follow this rule, so it's better
  to be able to handle trailing ':'

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/utils.bbclass |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index 56abdd8..3c2e342 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -338,8 +338,9 @@  def base_set_filespath(path, d):
 	# The ":" ensures we have an 'empty' override
 	overrides = (bb.data.getVar("OVERRIDES", d, 1) or "") + ":"
 	for p in path:
-		for o in overrides.split(":"):
-			filespath.append(os.path.join(p, o))
+		if p != "": 
+			for o in overrides.split(":"):
+				filespath.append(os.path.join(p, o))
 	return ":".join(filespath)
 
 def extend_variants(d, var, extend, delim=':'):