sstate.bbclass: normalize whitelisted paths

Without this a whitelisted path containing /../ breaks the test for a file
allowed to be provided by more than one recipe.

Noticed when local.conf contains:
DEPLOY_DIR = "${TOPDIR}/../deploy"

|ERROR: core-image-minimal-1.0-r0 do_image_complete: The recipe
| core-image-minimal is trying to install files into a shared area when those
| files already exist. Those files and their manifest location are:
| .../poky/deploy/images/qemux86/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
| Matched in b'manifest-qemux86-linux-yocto.deploy'

(From OE-Core rev: d82acf20541463b14a811788d28fb1db3539885b)

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Max Krummenacher 2016-09-11 19:13:20 +02:00 committed by Richard Purdie
parent d115b1277f
commit f5e2dafcb8
1 changed files with 1 additions and 0 deletions

View File

@ -205,6 +205,7 @@ def sstate_install(ss, d):
f = os.path.normpath(f)
realmatch = True
for w in whitelist:
w = os.path.normpath(w)
if f.startswith(w):
realmatch = False
break