All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/python-pyudev: depend on libudev instead of udev
@ 2026-08-08 10:13 Thomas Petazzoni via buildroot
  2026-08-08 10:13 ` [Buildroot] [PATCH 2/2] support/testing: add pyudev test Thomas Petazzoni via buildroot
  2026-08-08 14:17 ` [Buildroot] [PATCH 1/2] package/python-pyudev: depend on libudev instead of udev Julien Olivain via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-08-08 10:13 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard, Thomas Petazzoni

Commit 3f24135c56f6aa8f0524307b7339512fecfa6f92 ("package/libinput:
only needs libudev, not udev daemon") changed libinput to depend on
libudev instead of udev.

However, BR2_PACKAGE_LIBINPUT_PYTHON_TOOLS selects
BR2_PACKAGE_PYTHON_PYUDEV, which depends on udev, causing a broken
dependency chain:

WARNING: unmet direct dependencies detected for BR2_PACKAGE_PYTHON_PYUDEV
  Depends on [n]: BR2_PACKAGE_PYTHON3 [=y] && BR2_PACKAGE_HAS_UDEV [=n]
  Selected by [y]:
  - BR2_PACKAGE_LIBINPUT_PYTHON_TOOLS [=y] && BR2_PACKAGE_LIBINPUT [=y] && BR2_PACKAGE_PYTHON3 [=y]

Turns out that after experimenting, the majority of the pyudev
functionality works fine with just libudev. Only pyudev.udev_version()
has been detected as not working as it calls into udevadm. But the
actual features to enumerate devices and get their characteristics
just fine.

So, to fix the issue, we change the dependency of python-pyudev to
just libudev instead of udev.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/python-pyudev/Config.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/python-pyudev/Config.in b/package/python-pyudev/Config.in
index aa98c2cc61..1e61228a34 100644
--- a/package/python-pyudev/Config.in
+++ b/package/python-pyudev/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_PYTHON_PYUDEV
 	bool "python-pyudev"
-	depends on BR2_PACKAGE_HAS_UDEV
+	depends on BR2_PACKAGE_HAS_LIBUDEV
 	select BR2_PACKAGE_PYTHON3_ZLIB # runtime
 	help
 	  pyudev is a LGPL licenced, pure Python 2/3 binding to
@@ -9,5 +9,5 @@ config BR2_PACKAGE_PYTHON_PYUDEV
 
 	  https://github.com/pyudev/pyudev
 
-comment "python-pyudev needs udev /dev management"
-	depends on !BR2_PACKAGE_HAS_UDEV
+comment "python-pyudev needs libudev"
+	depends on !BR2_PACKAGE_HAS_LIBUDEV
-- 
2.55.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/2] support/testing: add pyudev test
  2026-08-08 10:13 [Buildroot] [PATCH 1/2] package/python-pyudev: depend on libudev instead of udev Thomas Petazzoni via buildroot
@ 2026-08-08 10:13 ` Thomas Petazzoni via buildroot
  2026-08-08 14:17 ` [Buildroot] [PATCH 1/2] package/python-pyudev: depend on libudev instead of udev Julien Olivain via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-08-08 10:13 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni

In order to verify that pyudev works fine, including with just
libudev-zero, add a basic test for this package.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 DEVELOPERS                                           |  2 ++
 .../testing/tests/package/sample_python_pyudev.py    |  4 ++++
 support/testing/tests/package/test_python_pyudev.py  | 12 ++++++++++++
 3 files changed, 18 insertions(+)
 create mode 100644 support/testing/tests/package/sample_python_pyudev.py
 create mode 100644 support/testing/tests/package/test_python_pyudev.py

diff --git a/DEVELOPERS b/DEVELOPERS
index 56dd9f3943..353f4a2ccf 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -3285,6 +3285,7 @@ F:	support/testing/tests/package/sample_python_augeas.py
 F:	support/testing/tests/package/sample_python_flask.py
 F:	support/testing/tests/package/sample_python_flask_expects_json.py
 F:	support/testing/tests/package/sample_python_git.py
+F:	support/testing/tests/package/sample_python_pyudev.py
 F:	support/testing/tests/package/sample_python_unittest_xml_reporting.py
 F:	support/testing/tests/package/test_nodejs.py
 F:	support/testing/tests/package/test_python_augeas.py
@@ -3294,6 +3295,7 @@ F:	support/testing/tests/package/test_python_flask_expects_json.py
 F:	support/testing/tests/package/test_python_fs.py
 F:	support/testing/tests/package/test_python_git.py
 F:	support/testing/tests/package/test_python_pyfatfs.py
+F:	support/testing/tests/package/test_python_pyudev.py
 F:	support/testing/tests/package/test_python_pyusb.py
 F:	support/testing/tests/package/test_python_serial.py
 F:	support/testing/tests/package/test_snagboot.py
diff --git a/support/testing/tests/package/sample_python_pyudev.py b/support/testing/tests/package/sample_python_pyudev.py
new file mode 100644
index 0000000000..8e4ae32511
--- /dev/null
+++ b/support/testing/tests/package/sample_python_pyudev.py
@@ -0,0 +1,4 @@
+import pyudev
+
+context = pyudev.Context()
+assert('/dev/ttyAMA0' in [ d.device_node for d in context.list_devices() ])
diff --git a/support/testing/tests/package/test_python_pyudev.py b/support/testing/tests/package/test_python_pyudev.py
new file mode 100644
index 0000000000..ec8985b31f
--- /dev/null
+++ b/support/testing/tests/package/test_python_pyudev.py
@@ -0,0 +1,12 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3PyUdev(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_LIBUDEV_ZERO=y
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_PYUDEV=y
+        """
+    sample_scripts = ["tests/package/sample_python_pyudev.py"]
-- 
2.55.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] package/python-pyudev: depend on libudev instead of udev
  2026-08-08 10:13 [Buildroot] [PATCH 1/2] package/python-pyudev: depend on libudev instead of udev Thomas Petazzoni via buildroot
  2026-08-08 10:13 ` [Buildroot] [PATCH 2/2] support/testing: add pyudev test Thomas Petazzoni via buildroot
@ 2026-08-08 14:17 ` Julien Olivain via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Julien Olivain via buildroot @ 2026-08-08 14:17 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot, James Hilliard

On 08/08/2026 12:13, Thomas Petazzoni via buildroot wrote:
> Commit 3f24135c56f6aa8f0524307b7339512fecfa6f92 ("package/libinput:
> only needs libudev, not udev daemon") changed libinput to depend on
> libudev instead of udev.
> 
> However, BR2_PACKAGE_LIBINPUT_PYTHON_TOOLS selects
> BR2_PACKAGE_PYTHON_PYUDEV, which depends on udev, causing a broken
> dependency chain:
> 
> WARNING: unmet direct dependencies detected for 
> BR2_PACKAGE_PYTHON_PYUDEV
>   Depends on [n]: BR2_PACKAGE_PYTHON3 [=y] && BR2_PACKAGE_HAS_UDEV [=n]
>   Selected by [y]:
>   - BR2_PACKAGE_LIBINPUT_PYTHON_TOOLS [=y] && BR2_PACKAGE_LIBINPUT [=y] 
> && BR2_PACKAGE_PYTHON3 [=y]
> 
> Turns out that after experimenting, the majority of the pyudev
> functionality works fine with just libudev. Only pyudev.udev_version()
> has been detected as not working as it calls into udevadm. But the
> actual features to enumerate devices and get their characteristics
> just fine.
> 
> So, to fix the issue, we change the dependency of python-pyudev to
> just libudev instead of udev.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Series applied to master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2026-08-08 14:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-08 10:13 [Buildroot] [PATCH 1/2] package/python-pyudev: depend on libudev instead of udev Thomas Petazzoni via buildroot
2026-08-08 10:13 ` [Buildroot] [PATCH 2/2] support/testing: add pyudev test Thomas Petazzoni via buildroot
2026-08-08 14:17 ` [Buildroot] [PATCH 1/2] package/python-pyudev: depend on libudev instead of udev Julien Olivain via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.