From 41ccc99f67dfca1748c6d4955369d31fd51ebad2 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Sun, 23 Jan 2022 17:25:11 +0100 Subject: [PATCH] Stubs for rebuilding packages --- oscbot/__init__.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/oscbot/__init__.py b/oscbot/__init__.py index 555bed7..8514352 100644 --- a/oscbot/__init__.py +++ b/oscbot/__init__.py @@ -70,6 +70,14 @@ class OSCBot(Plugin): def get_config_class(cls) -> Type[BaseProxyConfig]: return Config + async def parse_rebuilpac( + self, + project: str, + package: Optional[str] = None, + repo: Optional[str] = None, + arch: Optional[str] = None) -> None: + pass + async def parse_status( self, project: str, @@ -143,6 +151,26 @@ class OSCBot(Plugin): async def osc(self) -> None: pass + @osc.subcommand( + "rebuildpac", aliases=("rb",), + help="Rebuild a package or all packages in the repositories") + @command.argument("project", "project name") + @command.argument("package", "package name (or \"all\" for all packages)") + @command.argument("repository", "repository (optional)", required=False) + @command.argument("arch", "architecture (optional)", required=False) + async def rebuildpac(self, evt: MessageEvent, + project: str, + package: Optional[str] = None, + repository: Optional[str] = None, + arch: Optional[str] = None) -> None: + + if package == "all": + package = None + if repository == "all": + repository = None + if arch == "all": + arch = None + @osc.subcommand("status", aliases=("st",), help="Check status for package and repository") @command.argument("project", "project name")