mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
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 <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -110,11 +110,13 @@ def sstate_state_fromvars(d, task = None):
|
|||||||
return ss
|
return ss
|
||||||
|
|
||||||
def sstate_add(ss, source, dest, d):
|
def sstate_add(ss, source, dest, d):
|
||||||
srcbase = os.path.basename(source)
|
if not source.endswith("/"):
|
||||||
if not source.endswith:
|
|
||||||
source = source + "/"
|
source = source + "/"
|
||||||
if not dest.endswith:
|
if not dest.endswith("/"):
|
||||||
dest = dest + "/"
|
dest = dest + "/"
|
||||||
|
source = os.path.normpath(source)
|
||||||
|
dest = os.path.normpath(dest)
|
||||||
|
srcbase = os.path.basename(source)
|
||||||
ss['dirs'].append([srcbase, source, dest])
|
ss['dirs'].append([srcbase, source, dest])
|
||||||
return ss
|
return ss
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user