aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-14 15:52:45 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-14 15:56:53 +0000
commit172a74c540378149eec493c37c030e9f42f9603d (patch)
tree845d61692efe305dcd4c221e8a30f8e530efd542 /meta/classes/sstate.bbclass
parent56160ca49dd546b7db07ae2021eefef7279b0f10 (diff)
downloadopenembedded-core-contrib-172a74c540378149eec493c37c030e9f42f9603d.tar.gz
sstate: Fix various path manipulation issues
Fix missing parameter to endswith and pass paths through normpath to remove any duplicate "/" characters which would corrupt other calls like basename. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 2f31526828..c1925b2a53 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -110,11 +110,13 @@ def sstate_state_fromvars(d, task = None):
return ss
def sstate_add(ss, source, dest, d):
- srcbase = os.path.basename(source)
- if not source.endswith:
+ if not source.endswith("/"):
source = source + "/"
- if not dest.endswith:
+ if not dest.endswith("/"):
dest = dest + "/"
+ source = os.path.normpath(source)
+ dest = os.path.normpath(dest)
+ srcbase = os.path.basename(source)
ss['dirs'].append([srcbase, source, dest])
return ss