]> git.ipfire.org Git - people/ms/bricklayer.git/commitdiff
pakfire: Allow passing a specific configuration file
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 9 May 2022 16:17:14 +0000 (16:17 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 9 May 2022 16:17:14 +0000 (16:17 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/bricklayer
src/python/__init__.py

index b0d3a4c41d51ae8e21a8efbff93e3344df91430b..c3727dfec8da360251e8691a91f814b0994f5cea 100644 (file)
@@ -40,6 +40,8 @@ class Cli(object):
                parser = argparse.ArgumentParser(
                        description=_("IPFire Installation Tool CLI"),
                )
+               parser.add_argument("--pakfire-conf", metavar=_("FILE"),
+                       help=_("Pakfire Configuration file used for the installation process"))
                parser.add_argument("--first-install", action="store_true",
                        help=_("Runs the \"first install\" setup process"))
                parser.add_argument("--arch", nargs="?", default=self.native_arch,
index db3741dec6a75a3c09777eb2a69319a17e17f9b8..2dcceb201b6d3bd81d75cf1f0a5322222fa80e75 100644 (file)
@@ -45,8 +45,10 @@ class Bricklayer(object):
        """
                Bricklayer's base class
        """
-       def __init__(self, arch, first_install=False, debug=False, unattended=False, disks=[]):
+       def __init__(self, arch, pakfire_conf=None, first_install=False, debug=False,
+                       unattended=False, disks=[]):
                self.arch = arch
+               self.pakfire_conf = pakfire_conf
                self.first_install = first_install
                self.debug = debug
                self.unattended = unattended
@@ -246,7 +248,7 @@ class Bricklayer(object):
                }
 
                return pakfire.Pakfire(self.root, arch=self.arch,
-                       conf="/etc/pakfire/distros/ipfire3.conf", **kwargs)
+                       conf=self.pakfire_conf, **kwargs)
 
        def _select_bootloaders(self):
                """