sstate: Normalise paths before comparing with the whitelist

Submitted by Richard Purdie on Oct. 5, 2012, 1:16 p.m.

Details

Message ID 1349443004.15658.23.camel@ted
State Accepted
Commit ab8d9817275c24314c74e7e9bb43c5465c52b4cb
Headers show

Commit Message

Richard Purdie Oct. 5, 2012, 1:16 p.m.
Without this, path components like // could break comparisons with the whitelist leading
to warnings being displayed to the user unintentionally.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---

Patch hide | download patch | download mbox

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 03f083e..e820a2e 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -150,6 +150,7 @@  def sstate_install(ss, d):
     match = []
     for f in sharedfiles:
         if os.path.exists(f):
+            f = os.path.normpath(f)
             realmatch = True
             for w in whitelist:
                 if f.startswith(w):