diff --git a/rpmbuild/copr_rpmbuild/builders/mock.py b/rpmbuild/copr_rpmbuild/builders/mock.py index 003a79eef..6691499f1 100644 --- a/rpmbuild/copr_rpmbuild/builders/mock.py +++ b/rpmbuild/copr_rpmbuild/builders/mock.py @@ -27,6 +27,9 @@ def __init__(self, task, sourcedir, resultdir, config): self.buildroot_pkgs = task.get("buildroot_pkgs") self.enable_net = task.get("enable_net") self.repos = task.get("repos") + if task.get("repos") and task.get("priority") is not None: + self.repos["priority"] = task.get("priority") + self.bootstrap = task.get("bootstrap") self.bootstrap_image = task.get("bootstrap_image") self.timeout = task.get("timeout", 3600) diff --git a/rpmbuild/main.py b/rpmbuild/main.py index bd34e3a02..55258f82f 100755 --- a/rpmbuild/main.py +++ b/rpmbuild/main.py @@ -82,6 +82,9 @@ def get_parser(): base_parser.add_argument("--task-url", help="Full URL to a json task definition") base_parser.add_argument("--task-file", help="Path to a local json file with task definition") + # TODO: better help message + base_parser.add_argument("--priority", type=int, help="Set priority value of this repository") + return base_parser @@ -197,6 +200,9 @@ def get_task(args, config, build_config_url_path=None, task_id=None): if args.copr: task['task_id'] = copr_chroot_to_task_id(args.copr, args.chroot) + if args.priority: + task["priority"] = args.priority + return task diff --git a/rpmbuild/man/copr-rpmbuild.1.asciidoc b/rpmbuild/man/copr-rpmbuild.1.asciidoc index 59b7a8ec3..d0ed55b88 100644 --- a/rpmbuild/man/copr-rpmbuild.1.asciidoc +++ b/rpmbuild/man/copr-rpmbuild.1.asciidoc @@ -42,6 +42,9 @@ OPTIONS --verbose:: Print debugging information. +--priority:: + Set the priority of this copr repository. + --help:: Display help.