Stubs for rebuilding packages

This commit is contained in:
Luca Beltrame 2022-01-23 17:25:11 +01:00
parent b0358dea18
commit 41ccc99f67
Signed by: einar
GPG key ID: 4707F46E9EC72DEC

View file

@ -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")