From fa8a55a91422fdf86efe6bc06d73c2fa00fc5bae Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Mon, 11 Nov 2024 20:49:36 -0800 Subject: [PATCH] mkosi: ruff is not available on all distros Refactor to only install ruff where it is available --- mkosi.conf.d/05-tools/mkosi.conf | 1 - mkosi.conf.d/05-tools/mkosi.conf.d/arch.conf | 1 + mkosi.conf.d/05-tools/mkosi.conf.d/fedora.conf | 8 ++++++++ mkosi.conf.d/05-tools/mkosi.conf.d/opensuse.conf | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 mkosi.conf.d/05-tools/mkosi.conf.d/fedora.conf diff --git a/mkosi.conf.d/05-tools/mkosi.conf b/mkosi.conf.d/05-tools/mkosi.conf index 8ac2ebe24d6..02bf2aaddaf 100644 --- a/mkosi.conf.d/05-tools/mkosi.conf +++ b/mkosi.conf.d/05-tools/mkosi.conf @@ -7,4 +7,3 @@ ToolsTreePackages= meson mypy pkgconf - ruff diff --git a/mkosi.conf.d/05-tools/mkosi.conf.d/arch.conf b/mkosi.conf.d/05-tools/mkosi.conf.d/arch.conf index 81a6ee3c974..0a5621c1e63 100644 --- a/mkosi.conf.d/05-tools/mkosi.conf.d/arch.conf +++ b/mkosi.conf.d/05-tools/mkosi.conf.d/arch.conf @@ -10,5 +10,6 @@ ToolsTreePackages= libmicrohttpd python-jinja python-pytest + ruff tpm2-tss util-linux-libs diff --git a/mkosi.conf.d/05-tools/mkosi.conf.d/fedora.conf b/mkosi.conf.d/05-tools/mkosi.conf.d/fedora.conf new file mode 100644 index 00000000000..0b6bd4a5a9a --- /dev/null +++ b/mkosi.conf.d/05-tools/mkosi.conf.d/fedora.conf @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +[Match] +ToolsTreeDistribution=fedora + +[Build] +ToolsTreePackages= + ruff diff --git a/mkosi.conf.d/05-tools/mkosi.conf.d/opensuse.conf b/mkosi.conf.d/05-tools/mkosi.conf.d/opensuse.conf index 09c279037bb..658829f6cbc 100644 --- a/mkosi.conf.d/05-tools/mkosi.conf.d/opensuse.conf +++ b/mkosi.conf.d/05-tools/mkosi.conf.d/opensuse.conf @@ -12,6 +12,7 @@ ToolsTreePackages= pkgconfig(fdisk) pkgconfig(libmicrohttpd) pkgconfig(mount) + python3-ruff tss2-devel python3-jinja2 python3-pytest