summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>2015-09-10 15:51:33 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-14 20:46:38 +0100
commit7eabed3039b28119bb6642205bf26460695cb22e (patch)
tree2f05e607b60001dab7bb57aee03b0aaca6b54384
parentca73270b12f6bfaee890adcf914b1f43ba2db965 (diff)
downloadpoky-7eabed3039b28119bb6642205bf26460695cb22e.tar.gz
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 __init__.py 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 __init__.py files from each backport package during build time is impossible since it doenst actually contain that value, this patch simply removes the __init__.py* 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] (From OE-Core rev: e607a89267949b3d5e199b139f752db6000eac25) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/distutils.bbclass6
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() {
73 mv -f ${D}${datadir}/share/* ${D}${datadir}/ 73 mv -f ${D}${datadir}/share/* ${D}${datadir}/
74 rmdir ${D}${datadir}/share 74 rmdir ${D}${datadir}/share
75 fi 75 fi
76
77 # Fix backport modules
78 if test -e ${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/backports/__init__.py && test -e ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py; then
79 rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py;
80 rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.pyc;
81 fi
76} 82}
77 83
78EXPORT_FUNCTIONS do_compile do_install 84EXPORT_FUNCTIONS do_compile do_install