summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2016-07-27 10:15:23 +0800
committerChen Qi <Qi.Chen@windriver.com>2016-07-27 13:31:16 +0800
commit0afb5f75385876d2ecbca040449289bb39fae4d7 (patch)
tree288720403191e60fd6b8bbd39767879b8c3399b1
parentb32d430c3c7dccf3a8d06ab492d648893a05950f (diff)
downloadopenembedded-core-contrib-0afb5f75385876d2ecbca040449289bb39fae4d7.tar.gz
openembedded-core-contrib-0afb5f75385876d2ecbca040449289bb39fae4d7.tar.bz2
openembedded-core-contrib-0afb5f75385876d2ecbca040449289bb39fae4d7.zip
distutils: fix to avoid file-rdeps QA issue
For some nativesdk python packages, we would sometimes have the following QA issue. WARNING: nativesdk-python-django-1.8.8-r0 do_package_qa: QA Issue: /opt/windriver/wrlinux/9.0-qemux86/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/django-admin contained in package nativesdk-python-django require\ s /opt/windriver/wrlinux/9.0-qemux86/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/env, but no providers found in RDEPENDS_nativesdk-python-django? [file-rdeps] The problem is that in distutils.bbclass (and distutils3.bbclass), we replace ${STAGING_BINDIR_NATIVE}/python-native/python with ${bindir}/env. In nativesdk situation, ${bindir} is not /usr/bin, and this causes the QA issue. Fix this problem by hardcoding '/usr/bin/env'. Usually, we don't like hardcoding. But as far as I can see, /usr/bin/env is a little special. We skip the 'file-rdeps' QA checking for '/usr/bin/env' dependency. Besides, scripts in many packages do use '/usr/bin/env'. So we should assume it's there in our system. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-rw-r--r--meta/classes/distutils.bbclass4
-rw-r--r--meta/classes/distutils3.bbclass4
2 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index 857572d759..e74cd81a50 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -44,7 +44,7 @@ distutils_do_install() {
if test -e ${D}${bindir} ; then
for i in ${D}${bindir}/* ; do \
if [ ${PN} != "${BPN}-native" ]; then
- sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
+ sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:/usr/bin/env\ python:g $i
fi
sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
done
@@ -53,7 +53,7 @@ distutils_do_install() {
if test -e ${D}${sbindir}; then
for i in ${D}${sbindir}/* ; do \
if [ ${PN} != "${BPN}-native" ]; then
- sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
+ sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:/usr/bin/env\ python:g $i
fi
sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
done
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass
index a6720c5b6b..1132f7261a 100644
--- a/meta/classes/distutils3.bbclass
+++ b/meta/classes/distutils3.bbclass
@@ -47,14 +47,14 @@ distutils3_do_install() {
if test -e ${D}${bindir} ; then
for i in ${D}${bindir}/* ; do \
- sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i
+ sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:/usr/bin/env\ ${PYTHON_PN}:g $i
sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
done
fi
if test -e ${D}${sbindir}; then
for i in ${D}${sbindir}/* ; do \
- sed -i -e s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i
+ sed -i -e s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:/usr/bin/env\ ${PYTHON_PN}:g $i
sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
done
fi