Skip to contentSkip to conversation

ristretto: use python3native and depend on glib-2.0-native, python3-packaging-native

PATCH New Martin Jansa 1 participant 2 messages Feb 28, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ristretto: use python3native and depend on glib-2.0-native, python3-packaging-native

* it uses gdbus-codegen from glib-2.0-native which depended
on python3-distutils-native until
https://lists.openembedded.org/g/openembedded-core/message/196136
but distutils on host was enforced by sanity check only until mickledore with:
https://git.openembedded.org/openembedded-core/commit/?id=8e3a5b0709384f2b455a82ac1e8e212686fe4456

so on hosts without distutils this was already failing and the glib-2.0-native change only changes the dependency from distutils to packaging which results in:
https://errors.yoctoproject.org/Errors/Details/754996/

gdbus-codegen \
	--c-namespace=Tumbler \
	--interface-prefix=org.freedesktop.thumbnails. \
	--generate-c-code=tumbler \
	tumbler-service-dbus.xml

Traceback (most recent call last):
File "TOPDIR/build/tmp/work/riscv64-yoe-linux/ristretto/0.13.1/recipe-sysroot-native/usr/bin/gdbus-codegen", line 53, in <module>
from codegen import codegen_main
File "TOPDIR/build/tmp/work/riscv64-yoe-linux/ristretto/0.13.1/recipe-sysroot-native/usr/share/glib-2.0/codegen/codegen_main.py", line 29, in <module>
from . import dbustypes
File "TOPDIR/build/tmp/work/riscv64-yoe-linux/ristretto/0.13.1/recipe-sysroot-native/usr/share/glib-2.0/codegen/dbustypes.py", line 22, in <module>
from . import utils
File "TOPDIR/build/tmp/work/riscv64-yoe-linux/ristretto/0.13.1/recipe-sysroot-native/usr/share/glib-2.0/codegen/utils.py", line 22, in <module>
import packaging.version
ModuleNotFoundError: No module named 'packaging'

* packaging probably isn't as wide spread on host distros as old distutils was, so make sure it's available by using python3-native with python3-packaging-native from OE build

---
 meta-xfce/recipes-apps/ristretto/ristretto_0.13.1.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-xfce/recipes-apps/ristretto/ristretto_0.13.1.bb +2 -2
index 4aac89fe79..dcae982cee 100644
@@ -4,9 +4,9 @@ SECTION = "x11/application"
 LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=35d145429ad3cbf5308d1dc93f66376b"
 
-DEPENDS = "exo libexif libxfce4ui libxfce4util xfconf cairo file"
+DEPENDS = "exo libexif libxfce4ui libxfce4util xfconf cairo file glib-2.0-native python3-packaging-native"
 
-inherit xfce-app mime-xdg
+inherit xfce-app mime-xdg python3native
 
 RRECOMMENDS:${PN} += "tumbler"
 
Signature · 1 line
2.44.0
#1 lore raw

PATCH 2/2 xfce4-notifyd: use python3native and depend on python3-packaging-native

* it uses gdbus-codegen from glib-2.0-native which depended
on python3-distutils-native until
https://lists.openembedded.org/g/openembedded-core/message/196136
but distutils on host was enforced by sanity check only until mickledore with:
https://git.openembedded.org/openembedded-core/commit/?id=8e3a5b0709384f2b455a82ac1e8e212686fe4456

so on hosts without distutils this was already failing and the glib-2.0-native change only changes the dependency from distutils to packaging which results in:
https://errors.yoctoproject.org/Errors/Details/754995/

gdbus-codegen \
	--interface-prefix org.xfce.Notifyd.Log \
	--c-namespace Xfce \
	--generate-c-code xfce-notify-log-gbus \
	--glib-max-allowed 2.68 \
	../../xfce4-notifyd-0.8.2/common/xfce-notify-log-dbus.xml

Traceback (most recent call last):
File "TOPDIR/build/tmp/work/riscv64-yoe-linux/xfce4-notifyd/0.8.2/recipe-sysroot-native/usr/bin/gdbus-codegen", line 53, in <module>
from codegen import codegen_main
File "TOPDIR/build/tmp/work/riscv64-yoe-linux/xfce4-notifyd/0.8.2/recipe-sysroot-native/usr/share/glib-2.0/codegen/codegen_main.py", line 29, in <module>
from . import dbustypes
File "TOPDIR/build/tmp/work/riscv64-yoe-linux/xfce4-notifyd/0.8.2/recipe-sysroot-native/usr/share/glib-2.0/codegen/dbustypes.py", line 22, in <module>
from . import utils
File "TOPDIR/build/tmp/work/riscv64-yoe-linux/xfce4-notifyd/0.8.2/recipe-sysroot-native/usr/share/glib-2.0/codegen/utils.py", line 22, in <module>
import packaging.version
ModuleNotFoundError: No module named 'packaging'

* packaging probably isn't as wide spread on host distros as old distutils was, so make sure it's available by using python3-native with python3-packaging-native from OE build

---
 meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.8.2.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-xfce/recipes-apps/xfce4-notifyd/xfce4-notifyd_0.8.2.bb +2 -0
index 7dbd90c188..96cfd32f7b 100644
@@ -10,9 +10,11 @@ DEPENDS = " \
     libxfce4ui \
     xfconf \
     xfce4-panel \
+    python3-packaging-native \
 "
 
 inherit xfce-app
+inherit python3native
 
 SRC_URI:append = " file://xfce4-notifyd-get-var-abs-path.patch"
 
Signature · 1 line
2.44.0