self.parse_command_search()
self.parse_command_shell()
self.parse_command_update()
- self.parse_command_repo()
self.parse_command_provides()
# Finally parse all arguments from the command line and save them.
"info" : self.handle_info,
"search" : self.handle_search,
"shell" : self.handle_shell,
- "repo_create" : self.handle_repo_create,
"provides" : self.handle_provides,
}
sub_dist.add_argument("--resultdir", nargs="?",
help=_("Path were the output files should be copied to."))
- def parse_command_repo(self):
- sub_repo = self.sub_commands.add_parser("repo",
- help=_("Repository management commands."))
-
- sub_repo_commands = sub_repo.add_subparsers()
-
- self.parse_command_repo_create(sub_repo_commands)
-
- def parse_command_repo_create(self, sub_commands):
- sub_create = sub_commands.add_parser("create",
- help=_("Create a new repository index."))
- sub_create.add_argument("path", nargs=1, help=_("Path to the packages."))
- sub_create.add_argument("inputs", nargs="+", help=_("Path to input packages."))
- sub_create.add_argument("action", action="store_const", const="repo_create")
-
def handle_info(self):
Cli.handle_info(self, long=True)
self.pakfire.dist(pkg, resultdirs=[self.args.resultdir,])
+class CliServer(Cli):
+ def __init__(self):
+ self.parser = argparse.ArgumentParser(
+ description = _("Pakfire server command line interface."),
+ )
+
+ self.parse_common_arguments()
+
+ # Add sub-commands.
+ self.sub_commands = self.parser.add_subparsers()
+
+ self.parse_command_repo()
+
+ # Finally parse all arguments from the command line and save them.
+ self.args = self.parser.parse_args()
+
+ self.pakfire = Pakfire(
+ builder = True,
+ configs = [self.args.config],
+ disable_repos = self.args.disable_repo,
+ )
+
+ self.action2func = {
+ "repo_create" : self.handle_repo_create,
+ }
+
+ def parse_command_repo(self):
+ sub_repo = self.sub_commands.add_parser("repo",
+ help=_("Repository management commands."))
+
+ sub_repo_commands = sub_repo.add_subparsers()
+
+ self.parse_command_repo_create(sub_repo_commands)
+
+ def parse_command_repo_create(self, sub_commands):
+ sub_create = sub_commands.add_parser("create",
+ help=_("Create a new repository index."))
+ sub_create.add_argument("path", nargs=1, help=_("Path to the packages."))
+ sub_create.add_argument("inputs", nargs="+", help=_("Path to input packages."))
+ sub_create.add_argument("action", action="store_const", const="repo_create")
+
def handle_repo_create(self):
path = self.args.path[0]
self.pakfire.repo_create(path, self.args.inputs)
-
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-02-20 01:13+0100\n"
+"POT-Creation-Date: 2011-02-20 11:01+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Pakfire builder command line interface."
msgstr ""
-#: ../pakfire/cli.py:232
+#: ../pakfire/cli.py:230
msgid "Update the package indexes."
msgstr ""
-#: ../pakfire/cli.py:238
+#: ../pakfire/cli.py:236
msgid "Build one or more packages."
msgstr ""
-#: ../pakfire/cli.py:240
+#: ../pakfire/cli.py:238
msgid "Give name of at least one package to build."
msgstr ""
-#: ../pakfire/cli.py:244
+#: ../pakfire/cli.py:242
msgid "Build the package for the given architecture."
msgstr ""
-#: ../pakfire/cli.py:246 ../pakfire/cli.py:268
+#: ../pakfire/cli.py:244 ../pakfire/cli.py:266
msgid "Path were the output files should be copied to."
msgstr ""
-#: ../pakfire/cli.py:251
+#: ../pakfire/cli.py:249
msgid "Go into a shell."
msgstr ""
-#: ../pakfire/cli.py:253 ../pakfire/cli.py:264
+#: ../pakfire/cli.py:251 ../pakfire/cli.py:262
msgid "Give name of a package."
msgstr ""
-#: ../pakfire/cli.py:257
+#: ../pakfire/cli.py:255
msgid "Emulated architecture in the shell."
msgstr ""
-#: ../pakfire/cli.py:262
+#: ../pakfire/cli.py:260
msgid "Generate a source package."
msgstr ""
-#: ../pakfire/cli.py:272
+#: ../pakfire/cli.py:336
+msgid "Pakfire server command line interface."
+msgstr ""
+
+#: ../pakfire/cli.py:361
msgid "Repository management commands."
msgstr ""
-#: ../pakfire/cli.py:280
+#: ../pakfire/cli.py:369
msgid "Create a new repository index."
msgstr ""
-#: ../pakfire/cli.py:281
+#: ../pakfire/cli.py:370
msgid "Path to the packages."
msgstr ""
-#: ../pakfire/cli.py:282
+#: ../pakfire/cli.py:371
msgid "Path to input packages."
msgstr ""
-#: ../pakfire/__init__.py:165
+#: ../pakfire/__init__.py:174
msgid "Is this okay?"
msgstr ""
import os
import sys
-from pakfire.cli import Cli, CliBuilder
+from pakfire.cli import Cli, CliBuilder, CliServer
basename2cls = {
"pakfire" : Cli,
"pakfire-build" : CliBuilder,
+ "pakfire-server" : CliServer,
}
# Get the basename of the program
--- /dev/null
+pakfire
\ No newline at end of file
author_email = "info@ipfire.org",
url = "http://redmine.ipfire.org/projects/buildsystem3",
packages = ["pakfire", "pakfire.packages", "pakfire.plugins"],
- scripts = ["scripts/pakfire", "scripts/pakfire-build"],
+ scripts = ["scripts/pakfire", "scripts/pakfire-build", "scripts/pakfire-server"],
cmdclass = { "build" : build_extra.build_extra,
"build_i18n" : build_i18n.build_i18n },
)