Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix disutils and extend python-setuptools to nativesdk
@ 2016-07-27  5:52 Chen Qi
  2016-07-27  5:52 ` [PATCH 1/2] distutils: fix to avoid file-rdeps QA issue Chen Qi
  2016-07-27  5:52 ` [PATCH 2/2] python3-setuptools: extend to nativesdk Chen Qi
  0 siblings, 2 replies; 4+ messages in thread
From: Chen Qi @ 2016-07-27  5:52 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit b32d430c3c7dccf3a8d06ab492d648893a05950f:

  dpkg: use snapshot.debian.org for SRC_URI (2016-07-26 08:56:08 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib ChenQi/python-fixes
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/python-fixes

Chen Qi (2):
  distutils: fix to avoid file-rdeps QA issue
  python3-setuptools: extend to nativesdk

 meta/classes/distutils.bbclass                            | 4 ++--
 meta/classes/distutils3.bbclass                           | 4 ++--
 meta/recipes-devtools/python/python3-setuptools_22.0.5.bb | 7 ++++---
 3 files changed, 8 insertions(+), 7 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] distutils: fix to avoid file-rdeps QA issue
  2016-07-27  5:52 [PATCH 0/2] Fix disutils and extend python-setuptools to nativesdk Chen Qi
@ 2016-07-27  5:52 ` Chen Qi
  2016-07-27 14:20   ` Burton, Ross
  2016-07-27  5:52 ` [PATCH 2/2] python3-setuptools: extend to nativesdk Chen Qi
  1 sibling, 1 reply; 4+ messages in thread
From: Chen Qi @ 2016-07-27  5:52 UTC (permalink / raw)
  To: openembedded-core

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>
---
 meta/classes/distutils.bbclass  | 4 ++--
 meta/classes/distutils3.bbclass | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index 857572d..e74cd81 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 a6720c5..1132f72 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
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] python3-setuptools: extend to nativesdk
  2016-07-27  5:52 [PATCH 0/2] Fix disutils and extend python-setuptools to nativesdk Chen Qi
  2016-07-27  5:52 ` [PATCH 1/2] distutils: fix to avoid file-rdeps QA issue Chen Qi
@ 2016-07-27  5:52 ` Chen Qi
  1 sibling, 0 replies; 4+ messages in thread
From: Chen Qi @ 2016-07-27  5:52 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-devtools/python/python3-setuptools_22.0.5.bb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb b/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb
index fb2931c..90c242d 100644
--- a/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb
+++ b/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb
@@ -2,6 +2,7 @@ require python-setuptools.inc
 
 DEPENDS += "python3"
 DEPENDS_class-native += "python3-native"
+DEPENDS_class-nativesdk += "python3-nativesdk"
 
 inherit distutils3
 
@@ -14,11 +15,11 @@ do_install_append() {
     echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
 }
 
-RDEPENDS_${PN} = "\
+RDEPENDS_${PN}_class-native = "\
   python3-distutils \
   python3-compression \
 "
-RDEPENDS_${PN}_class-target = "\
+RDEPENDS_${PN} = "\
   python3-ctypes \
   python3-distutils \
   python3-email \
@@ -34,4 +35,4 @@ RDEPENDS_${PN}_class-target = "\
   python3-unittest \
   python3-xml \
 "
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] distutils: fix to avoid file-rdeps QA issue
  2016-07-27  5:52 ` [PATCH 1/2] distutils: fix to avoid file-rdeps QA issue Chen Qi
@ 2016-07-27 14:20   ` Burton, Ross
  0 siblings, 0 replies; 4+ messages in thread
From: Burton, Ross @ 2016-07-27 14:20 UTC (permalink / raw)
  To: Chen Qi; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 701 bytes --]

On 27 July 2016 at 06:52, Chen Qi <Qi.Chen@windriver.com> wrote:

> 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.
>

I think we should be replacing with ${bindir} for target binaries (so the
right paths are used, no matter what bindir is set to) and hard-coding
/usr/bin for native and nativesdk.

If the sanity test is hardcoding /usr/bin/env then that likely should
change to respect ${bindir} too.

Ross

[-- Attachment #2: Type: text/html, Size: 1215 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-27 14:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-27  5:52 [PATCH 0/2] Fix disutils and extend python-setuptools to nativesdk Chen Qi
2016-07-27  5:52 ` [PATCH 1/2] distutils: fix to avoid file-rdeps QA issue Chen Qi
2016-07-27 14:20   ` Burton, Ross
2016-07-27  5:52 ` [PATCH 2/2] python3-setuptools: extend to nativesdk Chen Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox