[oe-commits] Richard Purdie : sstate: Be consistent about sstate-inputdirs/ outputdirs ending with '/'

git at git.openembedded.org git at git.openembedded.org
Wed Nov 14 14:40:24 UTC 2012


Module: openembedded-core.git
Branch: master-next
Commit: 0109a3623a19f9ae289952a4f054e53c3eca4eaa
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=0109a3623a19f9ae289952a4f054e53c3eca4eaa

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Sat Nov  3 17:03:14 2012 +0000

sstate: Be consistent about sstate-inputdirs/outputdirs ending with '/'

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 at linuxfoundation.org>

---

 meta/classes/sstate.bbclass |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index cbb14e1..2f31526 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
 





More information about the Openembedded-commits mailing list