From: gsegatti Date: Mon, 24 Jan 2022 12:25:00 +0000 (-0800) Subject: Removal of Gentoo check X-Git-Tag: v13~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43eb1450ecb09990403968b348ae105a3d9d72a2;p=thirdparty%2Fmkosi.git Removal of Gentoo check The parse_args() method has a check for whether Gentoo's modules are currently installed. While this allows the system to fail early, it makes unit testing dependable on installing such packages. By removing this if() we're able to test argument parsing without on any distro with no package dependance. Additionally, system's correctness ir preserved since this same check is done later on gentoo.py --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index f5d03103a..9c86414e4 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -5711,10 +5711,6 @@ def parse_args(argv: Optional[List[str]] = None) -> Dict[str, argparse.Namespace # Parse again with any extra distribution files included. args = parse_args_file_group(argv, os.fspath(default_path), args.distribution) - if args.distribution == "gentoo": - from .gentoo import Gentoo - Gentoo.try_import_portage() - args_all["default"] = args return args_all