]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Implement Repositories= for zypper
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 2 Mar 2024 17:21:29 +0000 (18:21 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 5 Jun 2024 09:50:26 +0000 (11:50 +0200)
mkosi/config.py
mkosi/installer/zypper.py

index 995d52db68e7c438174bf77efab77735c53293bd..f227e9f80f7bc98f37ac9d41318d32e9335b0f41 100644 (file)
@@ -3856,13 +3856,6 @@ def load_config(args: Args, config: argparse.Namespace) -> Config:
             die("UEFI SecureBoot enabled, private key was found, but not the certificate.",
                 hint="Consider placing it in mkosi.crt")
 
-    if config.repositories and not (
-        config.distribution.is_dnf_distribution() or
-        config.distribution.is_apt_distribution() or
-        config.distribution == Distribution.arch
-    ):
-        die("Sorry, the --repositories option is only supported on pacman, dnf and apt based distributions")
-
     if config.overlay and not config.base_trees:
         die("--overlay can only be used with --base-tree")
 
index 2d2ecaed4058335162f1db85b6347a1ed1ffef75..4ecbd7bd371eec94a76df076b58173d60b2a5a7c 100644 (file)
@@ -111,6 +111,7 @@ class Zypper(PackageManager):
             "--gpg-auto-import-keys" if context.config.repository_key_check else "--no-gpg-checks",
             "--non-interactive",
             "--no-refresh",
+            *([f"--plus-content={repo}" for repo in context.config.repositories]),
         ]
 
     @classmethod