From: Michael Tremer Date: Tue, 18 Oct 2022 18:54:57 +0000 (+0000) Subject: client: Implement sending the build repository X-Git-Tag: 0.9.28~243 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4240696b5546690b831ea408de07f7f2bab8ad44;p=pakfire.git client: Implement sending the build repository Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/hub.py b/src/pakfire/hub.py index d9824d463..fefa1064c 100644 --- a/src/pakfire/hub.py +++ b/src/pakfire/hub.py @@ -195,7 +195,7 @@ class Hub(object): def get_build(self, uuid): return self._request("/builds/%s" % uuid, decode="json") - async def build(self, path, arches=None): + async def build(self, path, repo=None, arches=None): """ Create a new build on the hub """ @@ -206,7 +206,7 @@ class Hub(object): # Create a new build build_id = await self._request("POST", "/builds", - upload_id=upload_id, arches=arches) + upload_id=upload_id, repo=repo, arches=arches) log.debug("Build creates as %s" % build_id) diff --git a/src/scripts/pakfire-client.in b/src/scripts/pakfire-client.in index 1fcf261b1..7839550c9 100644 --- a/src/scripts/pakfire-client.in +++ b/src/scripts/pakfire-client.in @@ -43,6 +43,8 @@ class Cli(object): help=_("Package(s) to build")) build.add_argument("-a", "--arch", help=_("Build the package(s) for the given architecture only")) + build.add_argument("--repo", + help=_("Create the build in this repository")) build.set_defaults(func=self._build) # check-connection @@ -108,7 +110,7 @@ class Cli(object): # Build all packages for package in ns.packages: - await client.build(package, arches=ns.arch) + await client.build(package, arches=ns.arch, repo=ns.repo) finally: tmp.cleanup()