From 0876b68662c489f7f6038ed39ea5f13f8ebb223e Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Tue, 26 Mar 2024 13:02:39 -0700 Subject: [PATCH] Try installing python3-flake8 from noble-proposed Signed-off-by: Christophe Bedard --- dist/index.js | 10 ++++++++++ src/setup-ros-linux.ts | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/dist/index.js b/dist/index.js index c1c5d898a..bacd258db 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7281,6 +7281,16 @@ function runLinux() { } // Install development-related packages and some common dependencies yield apt.installAptDependencies(installConnext); + // Workaround for Noble: we need a newer version of python3-flake8 + if ("noble" == ubuntuCodename) { + yield utils.exec("sudo", [ + "bash", + "-c", + `echo "deb http://archive.ubuntu.com/ubuntu/ ${ubuntuCodename}-proposed restricted main multiverse universe" >> /etc/apt/sources.list.d/ubuntu-${ubuntuCodename}-proposed.list`, + ]); + yield utils.exec("sudo", ["apt-get", "update"]); + yield apt.runAptGetInstall([`python3-flake8/${ubuntuCodename}-proposed`]); + } // We don't use pip here to install dependencies for ROS 2 if (ubuntuCodename === ros1UbuntuVersion) { /* pip3 dependencies need to be installed after the APT ones, as pip3 diff --git a/src/setup-ros-linux.ts b/src/setup-ros-linux.ts index 109a5902f..f0730f624 100644 --- a/src/setup-ros-linux.ts +++ b/src/setup-ros-linux.ts @@ -175,6 +175,17 @@ export async function runLinux(): Promise { // Install development-related packages and some common dependencies await apt.installAptDependencies(installConnext); + // Workaround for Noble: we need a newer version of python3-flake8 + if ("noble" == ubuntuCodename) { + await utils.exec("sudo", [ + "bash", + "-c", + `echo "deb http://archive.ubuntu.com/ubuntu/ ${ubuntuCodename}-proposed restricted main multiverse universe" >> /etc/apt/sources.list.d/ubuntu-${ubuntuCodename}-proposed.list`, + ]); + await utils.exec("sudo", ["apt-get", "update"]); + await apt.runAptGetInstall([`python3-flake8/${ubuntuCodename}-proposed`]); + } + // We don't use pip here to install dependencies for ROS 2 if (ubuntuCodename === ros1UbuntuVersion) { /* pip3 dependencies need to be installed after the APT ones, as pip3