diff options
authorAlejandro Hernandez <>2015-09-10 15:51:33 +0000
committerRichard Purdie <>2015-09-14 10:44:05 +0100
commite607a89267949b3d5e199b139f752db6000eac25 (patch)
parentf64a18a1c0fb9f3cd1bde2dc4b55d721ae06ca1d (diff)
distutils.bbclass: Handle python-backport modules
When installing backport modules they stumble upon each other, complaining with the following error: ERROR: The recipe python-backports-ssl is trying to install files into a shared area when those files already exist. This is the correct behavior since thats just the way they were designed, all backport modules provide an file (the same among all packages), and without it they simply wouldnt work. distutils handles FILES_${PN}* variables for python packages, but it uses wildcards to include the required files, hence removing the files from each backport package during build time is impossible since it doenst actually contain that value, this patch simply removes the* files from the staging area if they already exist on sysroot, this way, these are not included in FILES_${PN} anymore, fixing the issue mentioned above. [YOCTO #8207] Signed-off-by: Alejandro Hernandez <> Signed-off-by: Ross Burton <>
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index 2498685d66..cd06713882 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -73,6 +73,12 @@ distutils_do_install() {
mv -f ${D}${datadir}/share/* ${D}${datadir}/
rmdir ${D}${datadir}/share
+ # Fix backport modules
+ if test -e ${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/backports/ && test -e ${D}${PYTHON_SITEPACKAGES_DIR}/backports/; then
+ rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/;
+ rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.pyc;
+ fi
EXPORT_FUNCTIONS do_compile do_install