From: Daan De Meyer Date: Wed, 26 Jul 2023 14:12:58 +0000 (+0200) Subject: Fix filelists on fedora X-Git-Tag: v15~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f20a437b47d1a207e4f4806ecb53686729ce26e;p=thirdparty%2Fmkosi.git Fix filelists on fedora We should only download these on older Fedora's, not newer ones. --- diff --git a/mkosi/distributions/fedora.py b/mkosi/distributions/fedora.py index a68a89c0b..484b01e92 100644 --- a/mkosi/distributions/fedora.py +++ b/mkosi/distributions/fedora.py @@ -59,7 +59,8 @@ class FedoraInstaller(DistributionInstaller): if url: repos += [Repo(name, url, (gpgurl,))] - setup_dnf(state, repos, filelists=fedora_release_at_least(state.config.release, "38")) + # TODO: Use `filelists=True` when F37 goes EOL. + setup_dnf(state, repos, filelists=fedora_release_at_most(state.config.release, "37")) invoke_dnf(state, "install", packages, apivfs=apivfs) @classmethod @@ -86,10 +87,10 @@ class FedoraInstaller(DistributionInstaller): return a -def fedora_release_at_least(release: str, threshold: str) -> bool: +def fedora_release_at_most(release: str, threshold: str) -> bool: if release in ("rawhide", "eln"): - return True - if threshold in ("rawhide", "eln"): return False + if threshold in ("rawhide", "eln"): + return True # If neither is 'rawhide', both must be integers - return int(release) >= int(threshold) + return int(release) <= int(threshold)