]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
rename is_rpm_distribution() into is_dnf_distribution()
authorFranck Bui <fbui@suse.com>
Fri, 10 Feb 2023 16:21:18 +0000 (17:21 +0100)
committerFranck Bui <fbui@suse.com>
Thu, 16 Feb 2023 12:46:42 +0000 (13:46 +0100)
mkosi/__init__.py
mkosi/backend.py

index a396b120cbc17e5f234dadd55601e1d98b2fbb9c..b57b1e0db3348f0a3897e661c8e729b87db851c6 100644 (file)
@@ -42,7 +42,7 @@ from mkosi.backend import (
     flatten,
     format_rlimit,
     is_centos_variant,
-    is_rpm_distribution,
+    is_dnf_distribution,
     patch_file,
     path_relative_to_cwd,
     set_umask,
@@ -2670,8 +2670,8 @@ def load_args(args: argparse.Namespace) -> MkosiConfig:
     if args.ssh_port <= 0:
         die("--ssh-port must be > 0")
 
-    if args.repo_dirs 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.repo_dirs and not (is_dnf_distribution(args.distribution) or args.distribution == Distribution.arch):
+        die("--repository-directory is only supported on DNF based distributions and Arch")
 
     if args.repo_dirs:
         args.repo_dirs = [p.absolute() for p in args.repo_dirs]
@@ -2687,8 +2687,8 @@ def load_args(args: argparse.Namespace) -> MkosiConfig:
     if args.qemu_kvm and not qemu_check_kvm_support():
         die("Sorry, the host machine does not support KVM acceleration.")
 
-    if args.repositories and not is_rpm_distribution(args.distribution) and args.distribution not in (Distribution.debian, Distribution.ubuntu):
-        die("Sorry, the --repositories option is only supported on RPM/Debian based distributions")
+    if args.repositories and not is_dnf_distribution(args.distribution) and args.distribution not in (Distribution.debian, Distribution.ubuntu):
+        die("Sorry, the --repositories option is only supported on DNF/Debian based distributions")
 
     return MkosiConfig(**vars(args))
 
index 46bb2d571110cea48776c13ca80f7c6c4fa899b3..3868cc6b70123e50041e182c4167e4d5d51644ad 100644 (file)
@@ -182,7 +182,7 @@ def detect_distribution() -> tuple[Optional[Distribution], Optional[str]]:
     return d, version_id
 
 
-def is_rpm_distribution(d: Distribution) -> bool:
+def is_dnf_distribution(d: Distribution) -> bool:
     return d in (
         Distribution.fedora,
         Distribution.mageia,