]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
client: Implement sending the build repository
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 18 Oct 2022 18:54:57 +0000 (18:54 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 18 Oct 2022 18:54:57 +0000 (18:54 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/hub.py
src/scripts/pakfire-client.in

index d9824d463ac5614dbdda048876d95f210693d45f..fefa1064c35984742b82c65d8f4daee0a9c22313 100644 (file)
@@ -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)
 
index 1fcf261b191c7789eddbb89aa6a0edfb30fb6e36..7839550c9c2a678f8728568a2fbee09d4cac0b55 100644 (file)
@@ -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()