Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions meta-ros-common/recipes-infrastructure/python/python-rospkg.inc

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
From 00ce476d8d4d7cf8f9ca61d7c1196d97c2180b6b Mon Sep 17 00:00:00 2001
From: Jan Vermaete <jan.vermaete@gmail.com>
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 <jan.vermaete@gmail.com>
---
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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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"