Skip to content

Case insensitive LSB name checking#189

Merged
dirk-thomas merged 2 commits intomasterfrom
less_strict_os_name
Jan 2, 2020
Merged

Case insensitive LSB name checking#189
dirk-thomas merged 2 commits intomasterfrom
less_strict_os_name

Conversation

@sloretz
Copy link
Copy Markdown
Contributor

@sloretz sloretz commented Dec 30, 2019

This PR fixes a bug that breaks rosdep when using Python 3.8 on Ubuntu.

platform.linux_distribution(full_distribution_name=0) returns Ubuntu while distro.linux_distribution(full_distrition_name=0) returns ubuntu. This causes rosdep to fail to detect the os version on ubuntu when using python 3.8. This does not appear to be a bug in distro, which warns the data returned may differ.

Python 3.8.0 (default, Oct 28 2019, 16:14:01) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import distro
>>> distro.linux_distribution()
('Ubuntu', '18.04', 'bionic')
>>> distro.linux_distribution(full_distribution_name=0)
('ubuntu', '18.04', 'bionic')
>>> 
Python 3.7.5 (default, Nov  7 2019, 10:50:52) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.linux_distribution()
__main__:1: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5
('Ubuntu', '18.04', 'bionic')
>>> platform.linux_distribution(full_distribution_name=0)
('Ubuntu', '18.04', 'bionic')

`platform.linux_distribution(full_distribution_name=0)` returns `Ubuntu`
while `distro.linux_distribution(full_distrition_name=0)` returns
`ubuntu`. This causes rosdep to fail to detect the os version on ubuntu
when using python 3.8.

Signed-off-by: Shane Loretz<sloretz@openrobotics.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
@dirk-thomas dirk-thomas merged commit 1ade2d8 into master Jan 2, 2020
@dirk-thomas dirk-thomas deleted the less_strict_os_name branch January 2, 2020 17:09
@dirk-thomas dirk-thomas added this to the 1.2.3 milestone Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants