diff --git a/meta-ros-common/recipes-infrastructure/python/python-rospkg.inc b/meta-ros-common/recipes-infrastructure/python/python-rospkg.inc deleted file mode 100644 index dd6dd6fbd5d..00000000000 --- a/meta-ros-common/recipes-infrastructure/python/python-rospkg.inc +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "ROS package library" -SECTION = "devel/python" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://src/rospkg/__init__.py;beginline=1;endline=31;md5=9cea8ac73441707f7779ae66adf75f62" -SRCNAME = "rospkg" - -SRCREV = "75c3645eb1d38e61fd39ca414e86b26dbf4cce88" -ROS_BRANCH ?= "branch=master" -SRC_URI = "git://github.com/ros-infrastructure/rospkg;${ROS_BRANCH};protocol=https" - - -RDEPENDS:${PN} += "python3-xml python3-rosdep python3-distro" - -BBCLASSEXTEND = "native" diff --git a/meta-ros-common/recipes-infrastructure/python/python3-rospkg/0001-Detect-the-OpenEmbedded-OS-with-lsb.patch b/meta-ros-common/recipes-infrastructure/python/python3-rospkg/0001-Detect-the-OpenEmbedded-OS-with-lsb.patch new file mode 100644 index 00000000000..e79581aea4f --- /dev/null +++ b/meta-ros-common/recipes-infrastructure/python/python3-rospkg/0001-Detect-the-OpenEmbedded-OS-with-lsb.patch @@ -0,0 +1,66 @@ +From 00ce476d8d4d7cf8f9ca61d7c1196d97c2180b6b Mon Sep 17 00:00:00 2001 +From: Jan Vermaete +Date: Tue, 2 Jun 2026 19:45:21 +0200 +Subject: [PATCH 1/1] Detect the OpenEmbedded 'OS' with lsb. + +distro.name() -> OpenEmbedded + The system what is building the custom distro + +distro.id() -> 'distro' + The created distibution. + Can be 'nodist', 'poky', 'oeros, ... + +Upstream-Status: Pending + +Signed-off-by: Jan Vermaete +--- + src/rospkg/os_detect.py | 22 +++++++++------------- + 1 file changed, 9 insertions(+), 13 deletions(-) + +diff --git a/src/rospkg/os_detect.py b/src/rospkg/os_detect.py +index 08db41a..26adfd9 100644 +--- a/src/rospkg/os_detect.py ++++ b/src/rospkg/os_detect.py +@@ -133,7 +133,7 @@ class LsbDetect(OsDetector): + def __init__(self, lsb_name, get_version_fn=None): + self.lsb_name = lsb_name + if distro.__name__ == "distro": +- self.lsb_info = (distro.id(), distro.version(), distro.codename()) ++ self.lsb_info = (distro.id(), distro.version(), distro.codename(), distro.name()) + elif hasattr(distro, "linux_distribution"): + self.lsb_info = distro.linux_distribution(full_distribution_name=0) + elif hasattr(distro, "dist"): +@@ -224,22 +224,18 @@ class FdoDetect(OsDetector): + raise OsNotDetected("called in incorrect OS") + + +-class OpenEmbedded(OsDetector): ++class OpenEmbedded(LsbDetect): + """ + Detect OpenEmbedded. + """ +- def is_os(self): +- return "ROS_OS_OVERRIDE" in os.environ and os.environ["ROS_OS_OVERRIDE"] == "openembedded" +- +- def get_version(self): +- if self.is_os(): +- return "" +- raise OsNotDetected('called in incorrect OS') ++ def __init__(self, get_version_fn=None): ++ super(OpenEmbedded, self).__init__('openembedded', get_version_fn) + +- def get_codename(self): +- if self.is_os(): +- return "" +- raise OsNotDetected('called in incorrect OS') ++ def is_os(self): ++ if self.lsb_info is None: ++ return False ++ # lsb_info[4] = distro.name() = 'openembedded' ++ return self.lsb_info[3].lower() == self.lsb_name.lower() + + + class Conda(OsDetector): +-- +2.43.0 + diff --git a/meta-ros-common/recipes-infrastructure/python/python3-rospkg_1.3.0.bb b/meta-ros-common/recipes-infrastructure/python/python3-rospkg_1.3.0.bb deleted file mode 100644 index 83a4944f86c..00000000000 --- a/meta-ros-common/recipes-infrastructure/python/python3-rospkg_1.3.0.bb +++ /dev/null @@ -1,3 +0,0 @@ -require python-rospkg.inc - -inherit setuptools3 diff --git a/meta-ros-common/recipes-infrastructure/python/python3-rospkg_1.6.1.bb b/meta-ros-common/recipes-infrastructure/python/python3-rospkg_1.6.1.bb new file mode 100644 index 00000000000..eeae150a8cd --- /dev/null +++ b/meta-ros-common/recipes-infrastructure/python/python3-rospkg_1.6.1.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "ROS package library" +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://src/rospkg/__init__.py;beginline=1;endline=31;md5=9cea8ac73441707f7779ae66adf75f62" +SRCNAME = "rospkg" + +SRCREV = "3c1f9c6d5d884dd42ee7388b9dc97d082794d207" +ROS_BRANCH ?= "branch=master" +SRC_URI = " \ + git://github.com/ros-infrastructure/rospkg;${ROS_BRANCH};protocol=https \ + file://0001-Detect-the-OpenEmbedded-OS-with-lsb.patch \ +" + +inherit setuptools3 ptest-python-pytest + +RDEPENDS:${PN} += "\ + python3-distro \ + python3-rosdep \ + python3-xml \ +" + +PTEST_PYTEST_DIR = "test" + +BBCLASSEXTEND = "native" +