Package: ros-rospkg
Version: 1.2.0-2
Severity: minor
Tags: patch
User: [email protected]
Usertags: origin-ubuntu focal ubuntu-patch

Dear maintainers,

In Ubuntu, the latest version of ros-rosdep was failing to build due to test
failures related to ros-rospkg, which was not properly detecting the
platform as Ubuntu.  Digging into this, I found that ros-rospkg was relying
on the lsb_release command to detect Debian and Ubuntu as platforms; but
lsb_release is not part of the base system, so this fails when the
additional lsb-release package is not installed.

The attached patch fixes ros-rospkg to use os-release on Ubuntu, which works
for all supported releases.  I have not looked to confirm that
/etc/os-release is also guaranteed to be present on all supported Debian
releases, but it probably is.

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
[email protected]                                     [email protected]
diff -Nru ros-rospkg-1.2.0/debian/patches/series 
ros-rospkg-1.2.0/debian/patches/series
--- ros-rospkg-1.2.0/debian/patches/series      2019-11-24 01:47:43.000000000 
-0800
+++ ros-rospkg-1.2.0/debian/patches/series      2019-11-29 17:05:19.000000000 
-0800
@@ -3,3 +3,4 @@
 0003-Set-rosversion-to-Debian.patch
 0004-Use-Python-in-instead-of-string-find.patch
 0005-Replace-deprecated-platform-functions-with-distro.patch
+ubuntu-uses-fdo-not-lsb.patch
diff -Nru ros-rospkg-1.2.0/debian/patches/ubuntu-uses-fdo-not-lsb.patch 
ros-rospkg-1.2.0/debian/patches/ubuntu-uses-fdo-not-lsb.patch
--- ros-rospkg-1.2.0/debian/patches/ubuntu-uses-fdo-not-lsb.patch       
1969-12-31 16:00:00.000000000 -0800
+++ ros-rospkg-1.2.0/debian/patches/ubuntu-uses-fdo-not-lsb.patch       
2019-11-29 17:09:14.000000000 -0800
@@ -0,0 +1,20 @@
+Description: Don't rely on LSB-based OS detection for Ubuntu
+ All recent versions of Ubuntu ship /etc/os-release, and the lsb_release
+ command is only available if the optional lsb-release package is
+ installed.
+Author: Steve Langasek <[email protected]>
+Last-Updated: 2019-11-29
+
+Index: ros-rospkg-1.2.0/src/rospkg/os_detect.py
+===================================================================
+--- ros-rospkg-1.2.0.orig/src/rospkg/os_detect.py
++++ ros-rospkg-1.2.0/src/rospkg/os_detect.py
+@@ -756,7 +756,7 @@
+ OsDetect.register_default(OS_QNX, QNX())
+ OsDetect.register_default(OS_RHEL, Rhel())
+ OsDetect.register_default(OS_SLACKWARE, Slackware())
+-OsDetect.register_default(OS_UBUNTU, LsbDetect("Ubuntu"))
++OsDetect.register_default(OS_UBUNTU, FdoDetect("ubuntu"))
+ OsDetect.register_default(OS_CLEARLINUX, FdoDetect("clear-linux-os"))
+ OsDetect.register_default(OS_NIXOS, FdoDetect("nixos"))
+ OsDetect.register_default(OS_WINDOWS, Windows())
-- 
debian-science-maintainers mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to