From: Richard Purdie Date: Wed, 14 Nov 2012 15:52:45 +0000 (+0000) Subject: sstate: Fix various path manipulation issues X-Git-Tag: rev_ivi_2015_02_04~14980 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7fa4c0cd784521b7487ab5565b1983be7eb93edc;p=scm%2Fbb%2Ftizen-distro.git 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. (From OE-Core rev: 172a74c540378149eec493c37c030e9f42f9603d) Signed-off-by: Richard Purdie --- diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 2f31526..c1925b2 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