diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-14 15:52:45 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-14 15:58:08 +0000 |
commit | aa75269454ebe7498e59fc2d6ca1fa43ce4b74bd (patch) | |
tree | cc1452e60923602768ac9d691debfbae23be4a5b /meta/classes/sstate.bbclass | |
parent | c176e5a3fe75cb0e896b5a665c6a7a41c7377f15 (diff) | |
download | poky-aa75269454ebe7498e59fc2d6ca1fa43ce4b74bd.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.
(From OE-Core rev: 172a74c540378149eec493c37c030e9f42f9603d)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r-- | meta/classes/sstate.bbclass | 8 |
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): | |||
110 | return ss | 110 | return ss |
111 | 111 | ||
112 | def sstate_add(ss, source, dest, d): | 112 | def sstate_add(ss, source, dest, d): |
113 | srcbase = os.path.basename(source) | 113 | if not source.endswith("/"): |
114 | if not source.endswith: | ||
115 | source = source + "/" | 114 | source = source + "/" |
116 | if not dest.endswith: | 115 | if not dest.endswith("/"): |
117 | dest = dest + "/" | 116 | dest = dest + "/" |
117 | source = os.path.normpath(source) | ||
118 | dest = os.path.normpath(dest) | ||
119 | srcbase = os.path.basename(source) | ||
118 | ss['dirs'].append([srcbase, source, dest]) | 120 | ss['dirs'].append([srcbase, source, dest]) |
119 | return ss | 121 | return ss |
120 | 122 | ||