]> git.ipfire.org Git - pakfire.git/commitdiff
cli: Allow passing the target architecture
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 18 May 2021 15:30:26 +0000 (15:30 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 18 May 2021 15:30:26 +0000 (15:30 +0000)
This switch enabled Pakfire to bootstrap for a different architecture
than the host architecture.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/cli.py

index 01576205f90f186f0c02b044aa9e72f86fd01905..e9c1a9bde79925fd9a59e57465836278318b6ad1 100644 (file)
@@ -57,6 +57,8 @@ class Cli(object):
                # Add common arguments
                self._add_common_arguments(parser)
 
+               parser.add_argument("--arch", "-a", nargs="?",
+                       help=_("Run pakfire for the given architecture"))
                parser.add_argument("--root", metavar="PATH", default="/",
                        help=_("The path where pakfire should operate in"))
 
@@ -200,6 +202,7 @@ class Cli(object):
 
        def pakfire(self, ns):
                p = base.Pakfire(
+                       arch=ns.arch,
                        conf=ns.config,
                        path=ns.root if "root" in ns else self.default_path,
                        offline=ns.offline,