[OE-core] [Patch] sstate.bbclass: normalize whitelisted paths

Max Krummenacher max.oss.09 at gmail.com
Sun Sep 11 17:13:20 UTC 2016


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'

Signed-off-by: Max Krummenacher <max.krummenacher at toradex.com>
---
 meta/classes/sstate.bbclass | 1 +
 1 file changed, 1 insertion(+)

Tested on a plain poky installation
Build Configuration:
BB_VERSION        = "1.31.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "SUSELINUX-42.1"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "2.1+snapshot-20160911"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-poky         
meta-yocto-bsp    = "master:51d03898cb1ca46db98179cfd3b1e8e0980de917"

With the patch core-image-minimal builds successful with or without
DEPLOY_DIR = "${TOPDIR}/../deploy" in local conf.
Without the patch, but with DEPLOY_DIR = "${TOPDIR}/../deploy", the build fails.

Max

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 8b6ac50..216e133 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -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
-- 
2.6.6




More information about the Openembedded-core mailing list