From e4639399e5905419a553a56332a41110e292fbb1 Mon Sep 17 00:00:00 2001 From: Jakub Kadlčík Date: Nov 06 2018 15:09:50 +0000 Subject: [PATCH 1/4] [cli] have numbered string fields because of epel6 --- diff --git a/cli/copr_cli/main.py b/cli/copr_cli/main.py index 8127f06..d0ea7ff 100644 --- a/cli/copr_cli/main.py +++ b/cli/copr_cli/main.py @@ -303,8 +303,8 @@ class Commands(object): print("Build was added to {0}:".format(builds[0].projectname)) for build in builds: - url = urljoin(self.config["copr_url"], "/coprs/build/{}".format(build.id)) - print(" {}".format(url)) + url = urljoin(self.config["copr_url"], "/coprs/build/{0}".format(build.id)) + print(" {0}".format(url)) build_ids = [build.id for build in builds] print("Created builds: {0}".format(" ".join(map(str, build_ids)))) @@ -370,7 +370,7 @@ class Commands(object): """ username, copr = self.parse_name(args.copr) project = self.client.project_proxy.delete(ownername=username, projectname=copr) - print("Project {} has been deleted.".format(project.name)) + print("Project {0} has been deleted.".format(project.name)) @requires_api_auth def action_fork(self, args): @@ -391,10 +391,10 @@ class Commands(object): dstownername=dstownername, dstprojectname=dstprojectname, confirm=args.confirm) if not dst: - print("Forking project {}/{} for you into {}.\nPlease be aware that it may take a few minutes " + print("Forking project {0}/{1} for you into {2}.\nPlease be aware that it may take a few minutes " "to duplicate backend data.".format(srcownername, srcprojectname, project.full_name)) else: - print("Updating packages in {} from {}/{}.\nPlease be aware that it may take a few minutes " + print("Updating packages in {0} from {1}/{2}.\nPlease be aware that it may take a few minutes " "to duplicate backend data.".format(project.full_name, srcownername, srcprojectname)) def action_mock_config(self, args): @@ -426,14 +426,14 @@ class Commands(object): return for project in projects: - print("Name: {}".format(project.name)) - print(" Description: {}".format(project.description)) + print("Name: {0}".format(project.name)) + print(" Description: {0}".format(project.description)) if project.chroot_repos: print(" Repo(s):") for name, url in project.chroot_repos.items(): - print(" {}: {}".format(name, url)) + print(" {0}: {1}".format(name, url)) if project.additional_repos: - print(" Additional repo: {}".format(" ".join(project.additional_repos))) + print(" Additional repo: {0}".format(" ".join(project.additional_repos))) print("") except CoprRequestException as ex: @@ -652,7 +652,7 @@ class Commands(object): module = self.client.module_proxy.build_from_file(ownername, projectname, args.yaml) else: module = self.client.module_proxy.build_from_url(ownername, projectname, args.url) - print("Created module {}".format(module.nsv)) + print("Created module {0}".format(module.nsv)) except CoprRequestException as ex: print(ex) From f4198877bc93bba025c4b802778caf5990bcd54f Mon Sep 17 00:00:00 2001 From: Jakub Kadlčík Date: Nov 06 2018 15:18:09 +0000 Subject: [PATCH 2/4] [cli] depend on munch because of tests --- diff --git a/cli/copr-cli.spec b/cli/copr-cli.spec index 21bea3d..b15ddfd 100644 --- a/cli/copr-cli.spec +++ b/cli/copr-cli.spec @@ -42,6 +42,7 @@ BuildRequires: python3-pylint BuildRequires: python3-pytest BuildRequires: python3-setuptools BuildRequires: python3-simplejson +BuildRequires: python3-munch %else Requires: python-copr >= 1.89 Requires: python-jinja2 @@ -53,7 +54,7 @@ BuildRequires: python-devel BuildRequires: python-jinja2 BuildRequires: python-mock BuildRequires: python-setuptools -BuildRequires: python-simplejson +BuildRequires: python-munch %endif # We historically shipped empty doc package, uninstall it. From 40f3f55caad8358bde981792356548b012c8fd2b Mon Sep 17 00:00:00 2001 From: Jakub Kadlčík Date: Nov 06 2018 15:20:28 +0000 Subject: [PATCH 3/4] [cli] add missing dependency on python-simplejson --- diff --git a/cli/copr-cli.spec b/cli/copr-cli.spec index b15ddfd..1d7264e 100644 --- a/cli/copr-cli.spec +++ b/cli/copr-cli.spec @@ -54,6 +54,7 @@ BuildRequires: python-devel BuildRequires: python-jinja2 BuildRequires: python-mock BuildRequires: python-setuptools +BuildRequires: python-simplejson BuildRequires: python-munch %endif From dc2b74f981525bc2b5c102133071940e36fcb184 Mon Sep 17 00:00:00 2001 From: Jakub Kadlčík Date: Nov 06 2018 15:25:50 +0000 Subject: [PATCH 4/4] [cli] we also buildrequire python-copr with APIv3 support --- diff --git a/cli/copr-cli.spec b/cli/copr-cli.spec index 1d7264e..e923745 100644 --- a/cli/copr-cli.spec +++ b/cli/copr-cli.spec @@ -35,7 +35,7 @@ Requires: python3-simplejson Recommends: python3-progress -BuildRequires: python3-copr +BuildRequires: python3-copr >= 1.89 BuildRequires: python3-devel BuildRequires: python3-jinja2 BuildRequires: python3-pylint @@ -49,7 +49,7 @@ Requires: python-jinja2 Requires: python-simplejson BuildRequires: pytest -BuildRequires: python-copr +BuildRequires: python-copr >= 1.89 BuildRequires: python-devel BuildRequires: python-jinja2 BuildRequires: python-mock