libxml2: Port gentest.py to Python-3
Quoted 6 lines · Martin Jansa via lists.openembedded.org
* but it still won't work well on hosts without libxml2, make sure to use pre-generated
testapi.cindo_compile_ptest* this is reproducible with
SOURCE_DATE_EPOCHset to 0 which e.g. meta-updater still sets by default for DISTROs which use it :(, see https://github.com/uptane/meta-updater/pull/35
Still not sure why I've started to see this just today, maybe just unfortunate filesystem ordering?
Might be similar to the issue shown in bc recently:
https://git.openembedded.org/openembedded-core/commit/?h=kirkstone&id=400ed3bc77232b9d67594fa012b1278a6c8be3c6
but in this case we need to prevent the rebuild (as I don't see how python2 gettest.py could have worked in dunfell builds before)
Without meta-updater setting SOURCE_DATE_EPOCH to 0 and with libxml2/2.9.14 used in kirkstone I see usable timestamps:
-rw-r--r-- 3 bitbake bitbake 1448791 May 2 11:42 libxml2/2.9.14-r0/libxml2-2.9.14/testapi.c
-rwxr-xr-x 1 bitbake bitbake 30753 May 2 10:52
libxml2/2.9.14-r0/libxml2-2.9.14/gentest.py*
so this isn't needed in kirkstone.
Quoted 20 lines
meta/recipes-core/libxml/libxml2_2.9.10.bb +10
-0do_compile_ptest() { + # Make sure that testapi.c is newer than gentests.py, because + # with reproducible builds, they will both get e.g. Jan 1 1970 + # modification time from SOURCE_DATE_EPOCH and then check-am + # might try to rebuild_testapi, which will fail even with + # 0001-Port-gentest.py-to-Python-3.patch, because it needs + # libxml2 module (libxml2-native dependency and correctly + # set PYTHON_SITE_PACKAGES), it's easier to + # just rely on pre-generated testapi.c from the release + touch ${S}/testapi.c + oe_runmake check-am }