]> git.ipfire.org Git - pakfire.git/commitdiff
Allow passing --distro on pakfire-builder.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 27 Oct 2012 21:42:01 +0000 (23:42 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 27 Oct 2012 21:42:01 +0000 (23:42 +0200)
python/pakfire/cli.py

index 55e29a35866829ee2ce481946fc71644a585ff05..e7da9ccb5e7c565f5eec291a8fd79c5cece03897 100644 (file)
@@ -450,8 +450,17 @@ class CliBuilder(Cli):
                                "offline" : self.args.offline,
                        }
 
+               if hasattr(self.args, "distro"):
+                       ret["distro_name"] = self.args.distro
+
                return ret
 
+       def parse_common_arguments(self, *args, **kwargs):
+               Cli.parse_common_arguments(self, *args, **kwargs)
+
+               self.parser.add_argument("--distro", nargs="?",
+                       help=_("Choose the distribution configuration to use for build"))
+
        def parse_command_update(self):
                # Implement the "update" command.
                sub_update = self.sub_commands.add_parser("update",