From: Joerg Behrmann Date: Mon, 22 May 2023 15:19:43 +0000 (+0200) Subject: config: only use host release if we can detect one X-Git-Tag: v15~132 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b94ef612541356c41207c50eed207eacd22626de;p=thirdparty%2Fmkosi.git config: only use host release if we can detect one --- diff --git a/mkosi/config.py b/mkosi/config.py index cc665b6d0..56182773b 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -188,7 +188,7 @@ def config_parse_compression(dest: str, value: Optional[str], namespace: argpars return Compression.zst if parse_boolean(value) else Compression.none -def config_default_release(namespace: argparse.Namespace) -> Any: +def config_default_release(namespace: argparse.Namespace) -> str: # If we encounter Release in [Match] and no distribution has been set yet, configure the default # distribution as well since the default release depends on the selected distribution. if "distribution" not in namespace: @@ -198,7 +198,7 @@ def config_default_release(namespace: argparse.Namespace) -> Any: # If the configured distribution matches the host distribution, use the same release as the host. hd, hr = detect_distribution() - if d == hd: + if d == hd and hr is not None: return hr return {