]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Removal of Gentoo check
authorgsegatti <gabrielsegatti2@gmail.com>
Mon, 24 Jan 2022 12:25:00 +0000 (04:25 -0800)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 25 Jan 2022 17:43:29 +0000 (17:43 +0000)
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

mkosi/__init__.py

index f5d03103a6ac1f4302ccbe09099c3c69adccdcf4..9c86414e46d0e014083d1ba9bcfc36c73959aa16 100644 (file)
@@ -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