From fcbe9c41de39fa77316f6254e15b9800f2b62e67 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Fri, 10 Jan 2025 16:10:50 +0100 Subject: [PATCH] package/gpsd: python support needs pyserial Usually, ubxtool, a python-based tool to drive u-blox devices, connects to a gpsd instance and delegates to it the responsibility to write to and read from the actual device. This is sane, because a serial device can only be opened once, and if gpsd is running, it has that device open. However, in some cases, ubxtool can be used to directly talk to the device, to pre-configure it before gpsd runs, or even in the absence of gpsd altogether. This is not used very often, except when setting up an RTK base, where gpsd is not needed. In that case, ubxtool will directly talk to the serial device. It uses the pyserial python module. Since this is not the traditional way to talk to the device, failure to import the module is ignored, and the error reporting is deferred until it is actually needed, which is why we did not catch the issue earlier. See [1] and [2]. Fixes: f3ef0723cf71 (package/gpsd: enable python support and modules) [1] https://gitlab.com/gpsd/gpsd/-/blob/release-3.25/clients/ubxtool.py.in#L47 [2] https://gitlab.com/gpsd/gpsd/-/blob/release-3.25/gps/gps.py.in#L36 Signed-off-by: Yann E. MORIN Cc: Bernd Kuhls [Julien: add link to described code portion] Signed-off-by: Julien Olivain (cherry picked from commit 5d2f3737a1e52d140bd412bf01241eecf5cff994) Signed-off-by: Peter Korsgaard --- package/gpsd/Config.in | 1 + 1 file changed, 1 insertion(+) diff --git a/package/gpsd/Config.in b/package/gpsd/Config.in index 92a124b8ac..fa4dc7a814 100644 --- a/package/gpsd/Config.in +++ b/package/gpsd/Config.in @@ -238,6 +238,7 @@ config BR2_PACKAGE_GPSD_PYTHON bool "build Python support and modules" depends on BR2_USE_WCHAR # python3 select BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_PYTHON_SERIAL # runtime help Python libraries and tools for the gpsd service daemon including gpsfake test harness.