Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix determining supported kernel version for HTTP 1.1 in kernels with patch version 0 #2202

Merged
merged 1 commit into from
Jan 25, 2023

Conversation

peci1
Copy link
Contributor

@peci1 peci1 commented Nov 8, 2021

I use ROS on a system with mainline kernels, and every time a new minor version is installed, ROS stops working.

That's because the uname of the kernel with patch version 0 looks like this: 5.15-051500-generic. It does not correspond to the standard x.y.z-whatever pattern, which breaks rosgraph. The error I'm getting from rosgraph is:

ValueError: invalid literal for int() with base 10: '15-051501-generic'

This patch removes all characters starting from the first non-numeric character in the minor version part. This should make the int() call pass.

I also added another workaround that returns True as early as kernel 5.x or newer is detected, not looking at the minor version at all. This should further limit the surface for more bugs like this.

I'm not sure how other kernel strings in other distros than Ubuntu can look like, but taking into account I'm the first one reporting such issue, I believe the kernel strings look more or less the same, thus this fix should be the "final" ™ one in this regard.

Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
Copy link
Contributor

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good to me, but

That's because the uname of the kernel with patch version 0 looks like this: 5.15-051500-generic

isn't this supposed to be more like 5.15.0-051500-generic?

@peci1
Copy link
Contributor Author

peci1 commented Nov 8, 2021

That's what I'd expect, but the PPA I'm using apparently doesn't follow the naming:
Snímek obrazovky pořízený 2021-11-08 17-27-43

@mjcarroll mjcarroll merged commit 047716c into ros:noetic-devel Jan 25, 2023
@peci1 peci1 mentioned this pull request Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants