]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
centos: Add check that --netdev is always used with EPEL variants
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 19 Aug 2022 10:37:16 +0000 (12:37 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 19 Aug 2022 11:21:29 +0000 (13:21 +0200)
mkosi/__init__.py

index a96f5ef76089376db31b86de1010ea54d1be68be..59228abcd13f26b6285e67d3786e8ba60b143530 100644 (file)
@@ -6697,6 +6697,9 @@ def load_args(args: argparse.Namespace) -> MkosiArgs:
     if args.repos_dir and not (is_rpm_distribution(args.distribution) or args.distribution == Distribution.arch):
         die("--repository-directory is only supported on RPM based distributions and Arch")
 
+    if args.netdev and is_centos_variant(args.distribution) and not is_epel_variant(args.distribution):
+        die("--netdev is only supported on EPEL centOS variants")
+
     # We set a reasonable umask so that files that are created in the image
     # will have reasonable permissions. We don't want those permissions to be
     # influenced by the caller's umask which will be used only for output files.