From patchwork Tue Nov 13 14:05:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: sstate: Be consistent about sstate-inputdirs/outputdirs ending with '/' Date: Tue, 13 Nov 2012 14:05:40 -0000 From: Richard Purdie X-Patchwork-Id: 38921 Message-Id: <1352815540.24487.124.camel@ted> To: openembedded-core 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 --- diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 744cc14..12c9c60 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -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