]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate: Be consistent about sstate-inputdirs/outputdirs ending with '/'
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 3 Nov 2012 17:03:14 +0000 (17:03 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 14 Nov 2012 14:32:29 +0000 (14:32 +0000)
The manifest file can become corrupted if sstate-inputdirs and sstate-outputdirs
don't have matching endings. This patch ensures that even if set incorrectly,
the code functions as intended, thereby handling manifest corruption safely.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass

index cbb14e1177c234790743d76ee2d14b55588b8fe8..2f31526828ad0d72c511e2c6c5f50c06eaafb96d 100644 (file)
@@ -111,6 +111,10 @@ def sstate_state_fromvars(d, task = None):
 
 def sstate_add(ss, source, dest, d):
     srcbase = os.path.basename(source)
+    if not source.endswith:
+         source = source + "/"
+    if not dest.endswith:
+         dest = dest + "/"
     ss['dirs'].append([srcbase, source, dest])
     return ss