Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] distutils3: Avoid MACHINE specific checksums
@ 2015-09-30 13:54 Richard Purdie
  2015-09-30 14:43 ` Martin Jansa
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2015-09-30 13:54 UTC (permalink / raw)
  To: openembedded-core

The MACHINE variable is used to handle sysroot paths within one of the
patches to python3-native. In this context, it is relocation safe and
the resulting packages should not have MACHINE specific checksums,
therefore excluding MACHINE in this context is safe.

This whole setup is ugly and ideally we should come up with a better
way of handling this but at least allow a stop gap solution for now.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass
index e909ef4..443bf3a 100644
--- a/meta/classes/distutils3.bbclass
+++ b/meta/classes/distutils3.bbclass
@@ -21,6 +21,7 @@ distutils3_do_compile() {
         build ${DISTUTILS_BUILD_ARGS} || \
         bbfatal "${PYTHON_PN} setup.py build_ext execution failed."
 }
+distutils3_do_compile[vardepsexclude] = "MACHINE"
 
 distutils3_stage_headers() {
         install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
@@ -33,6 +34,7 @@ distutils3_stage_headers() {
         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
         bbfatal "${PYTHON_PN} setup.py install_headers execution failed."
 }
+distutils3_stage_headers[vardepsexclude] = "MACHINE"
 
 distutils3_stage_all() {
         if [ ${BUILD_SYS} != ${HOST_SYS} ]; then
@@ -48,6 +50,7 @@ distutils3_stage_all() {
         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
         bbfatal "${PYTHON_PN} setup.py install (stage) execution failed."
 }
+distutils3_stage_all[vardepsexclude] = "MACHINE"
 
 distutils3_do_install() {
         install -d ${D}${PYTHON_SITEPACKAGES_DIR}
@@ -90,6 +93,7 @@ distutils3_do_install() {
             rmdir ${D}${datadir}/share
         fi
 }
+distutils3_do_install[vardepsexclude] = "MACHINE"
 
 EXPORT_FUNCTIONS do_compile do_install
 




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

* Re: [PATCH] distutils3: Avoid MACHINE specific checksums
  2015-09-30 13:54 [PATCH] distutils3: Avoid MACHINE specific checksums Richard Purdie
@ 2015-09-30 14:43 ` Martin Jansa
  2015-09-30 15:01   ` Burton, Ross
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Jansa @ 2015-09-30 14:43 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

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

On Wed, Sep 30, 2015 at 02:54:35PM +0100, Richard Purdie wrote:
> The MACHINE variable is used to handle sysroot paths within one of the
> patches to python3-native. In this context, it is relocation safe and
> the resulting packages should not have MACHINE specific checksums,
> therefore excluding MACHINE in this context is safe.
> 
> This whole setup is ugly and ideally we should come up with a better
> way of handling this but at least allow a stop gap solution for now.

There was some short discussion about this long time ago:
http://patchwork.openembedded.org/patch/74129/

I'm still using that patch and still haven't found any issues caused by
that, but I'm not using python3 recipes (except building them in world),
so it's possible I've just overlooked them.

> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> 
> diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass
> index e909ef4..443bf3a 100644
> --- a/meta/classes/distutils3.bbclass
> +++ b/meta/classes/distutils3.bbclass
> @@ -21,6 +21,7 @@ distutils3_do_compile() {
>          build ${DISTUTILS_BUILD_ARGS} || \
>          bbfatal "${PYTHON_PN} setup.py build_ext execution failed."
>  }
> +distutils3_do_compile[vardepsexclude] = "MACHINE"
>  
>  distutils3_stage_headers() {
>          install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
> @@ -33,6 +34,7 @@ distutils3_stage_headers() {
>          ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
>          bbfatal "${PYTHON_PN} setup.py install_headers execution failed."
>  }
> +distutils3_stage_headers[vardepsexclude] = "MACHINE"
>  
>  distutils3_stage_all() {
>          if [ ${BUILD_SYS} != ${HOST_SYS} ]; then
> @@ -48,6 +50,7 @@ distutils3_stage_all() {
>          ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
>          bbfatal "${PYTHON_PN} setup.py install (stage) execution failed."
>  }
> +distutils3_stage_all[vardepsexclude] = "MACHINE"
>  
>  distutils3_do_install() {
>          install -d ${D}${PYTHON_SITEPACKAGES_DIR}
> @@ -90,6 +93,7 @@ distutils3_do_install() {
>              rmdir ${D}${datadir}/share
>          fi
>  }
> +distutils3_do_install[vardepsexclude] = "MACHINE"
>  
>  EXPORT_FUNCTIONS do_compile do_install
>  
> 
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [PATCH] distutils3: Avoid MACHINE specific checksums
  2015-09-30 14:43 ` Martin Jansa
@ 2015-09-30 15:01   ` Burton, Ross
  2015-09-30 15:56     ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2015-09-30 15:01 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

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

On 30 September 2015 at 15:43, Martin Jansa <martin.jansa@gmail.com> wrote:

> I'm still using that patch and still haven't found any issues caused by
> that, but I'm not using python3 recipes (except building them in world),
> so it's possible I've just overlooked them.
>

It's possible that you're installing eg python3-pip into a totally wrong
directory though, but I'm having a look at this right now and have a funny
feeling that a lot of this can actually be deleted.

Ross

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

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

* Re: [PATCH] distutils3: Avoid MACHINE specific checksums
  2015-09-30 15:01   ` Burton, Ross
@ 2015-09-30 15:56     ` Richard Purdie
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2015-09-30 15:56 UTC (permalink / raw)
  To: Burton, Ross; +Cc: openembedded-core

On Wed, 2015-09-30 at 16:01 +0100, Burton, Ross wrote:
> On 30 September 2015 at 15:43, Martin Jansa <martin.jansa@gmail.com>
> wrote:
>         I'm still using that patch and still haven't found any issues
>         caused by
>         that, but I'm not using python3 recipes (except building them
>         in world),
>         so it's possible I've just overlooked them.
>
> It's possible that you're installing eg python3-pip into a totally
> wrong directory though, but I'm having a look at this right now and
> have a funny feeling that a lot of this can actually be deleted.

Agreed. I will likely take the patch I've proposed, since it deals with
a real issue but if we can then clean all this up I'd be all in favour.

At the back of my mind was a plan to figure out the various python
module types that maximally stress distutils.bbclass and
setuptools.bbclass and then make sure we have an example of each in
OE-Core so we can put some better regression testing around this too.

Cheers,

Richard




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

end of thread, other threads:[~2015-09-30 15:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-30 13:54 [PATCH] distutils3: Avoid MACHINE specific checksums Richard Purdie
2015-09-30 14:43 ` Martin Jansa
2015-09-30 15:01   ` Burton, Ross
2015-09-30 15:56     ` Richard Purdie

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