Skip to content

Commit

Permalink
deps: Fix comparison of Linux release version
Browse files Browse the repository at this point in the history
Only use the numeric version of the Linux release, not the full version
string. This is because the full string may not follow the version
scheme required by the Version class.
  • Loading branch information
blockstreamsatellite committed Dec 23, 2023
1 parent 63b608b commit c7e10a3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions blocksatcli/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ def drivers(args):
# Install pre-requisites
distro_id = distro.id()
linux_release = platform.release()
linux_release_version = linux_release.split('-')[0] # x.y.z version only
is_rpi_os = _detect_raspberry_pi_os()
if is_rpi_os:
linux_headers = "raspberrypi-kernel-headers"
Expand Down Expand Up @@ -706,7 +707,8 @@ def drivers(args):
# ov9650.ko undefined!": disable ov9650 from the build. The problem was
# observed on kernel versions 5.3.7 and 5.7.7. Apply the workaround for any
# version < 5.8.
if (distro_id == "fedora" and Version(linux_release) < Version('5.8')):
if (distro_id == "fedora"
and Version(linux_release_version) < Version('5.8')):
disable_list.append("VIDEO_OV9650")

# On Raspbian, disable the MN88436 drivers to avoid the
Expand All @@ -715,7 +717,8 @@ def drivers(args):
disable_list.append("DVB_MN88436")

# Disable RC/IR support
if (distro_id == "raspbian" or Version(linux_release) >= Version('6.0')):
if (distro_id == "raspbian"
or Version(linux_release_version) >= Version('6.0')):
runner.run(
["sed", "-i", "-r", "s/(^CONFIG.*_RC.*=)./\1n/g", "v4l/.config"],
cwd=media_build_dir)
Expand Down

0 comments on commit c7e10a3

Please sign in to comment.