Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : master
---------------------------------------------------------------
commit 67b33ac842852d792b6ad82df414c02e5ebb6ce4
Author: Adam Samalik <asamalik(a)redhat.com>
Date: Thu Apr 3 09:45:14 2014 +0200
fixes and documentation for 66287cc8
---------------------------------------------------------------
cli/copr_cli/main.py | 4 ++--
cli/copr_cli/subcommands.py | 4 ++--
cli/man/copr-cli.1.asciidoc | 5 ++++-
frontend/coprs_frontend/coprs/static/copr.css | 2 +-
frontend/coprs_frontend/coprs/templates/api.html | 1 +
.../templates/coprs/detail/_builds_forms.html | 2 +-
6 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/cli/copr_cli/main.py b/cli/copr_cli/main.py
index 35cf03f..a1dc532 100644
--- a/cli/copr_cli/main.py
+++ b/cli/copr_cli/main.py
@@ -106,8 +106,8 @@ def setup_parser():
)
parser_build.add_argument("pkgs", nargs="+",
help="URL of packages to build")
- parser_build.add_argument("--chroot", dest="chroots",
action="append",
- help="If you don't need this build for all the
project's chroots - you can use it several times for each chroot.")
+ parser_build.add_argument("-r", "--chroot",
dest="chroots", action="append",
+ help="If you don't need this build for all the
project's chroots. You can use it several times for each chroot you need.")
parser_build.add_argument("--memory", dest="memory",
help="")
parser_build.add_argument("--timeout", dest="timeout",
diff --git a/cli/copr_cli/subcommands.py b/cli/copr_cli/subcommands.py
index 36c681e..09e34e4 100644
--- a/cli/copr_cli/subcommands.py
+++ b/cli/copr_cli/subcommands.py
@@ -200,7 +200,7 @@ def cancel(build_id):
else:
return (False, output["error"])
-def build(copr, pkgs, memory, timeout, wait=True, result=None, chroots=[]):
+def build(copr, pkgs, memory, timeout, wait=True, result=None, chroots=None):
""" Build a new package into a given copr.
Result is dictionary where is returned "errmsg" in case of error.
@@ -226,7 +226,7 @@ def build(copr, pkgs, memory, timeout, wait=True, result=None,
chroots=[]):
"timeout": timeout
}
- if chroots:
+ if chroots is not None:
for chroot in chroots:
data[chroot] = "y"
diff --git a/cli/man/copr-cli.1.asciidoc b/cli/man/copr-cli.1.asciidoc
index d8b87c7..518b456 100644
--- a/cli/man/copr-cli.1.asciidoc
+++ b/cli/man/copr-cli.1.asciidoc
@@ -73,9 +73,12 @@ Instructions for the project.
`copr-cli build [options]`
~~~~~~~~~~~~~~~~~~~~~~~~~~
-usage: copr-cli build [-h] [--memory MEMORY] [--timeout TIMEOUT] [--nowait]
+usage: copr-cli build [-h] [-r CHROOTS] [--memory MEMORY] [--timeout TIMEOUT] [--nowait]
project pkg_url [pkg_url ...]
+-r --chroot::
+If you don't need this build for all the project's chroots. You can use it
several times for each chroot you need.
+
--memory::
Override memory for this build
diff --git a/frontend/coprs_frontend/coprs/static/copr.css
b/frontend/coprs_frontend/coprs/static/copr.css
index 9607491..102e033 100644
--- a/frontend/coprs_frontend/coprs/static/copr.css
+++ b/frontend/coprs_frontend/coprs/static/copr.css
@@ -242,7 +242,7 @@ dt.field-label {
font-weight: bold;
}
-dl.field-label-help {
+dd.field-label-help {
margin-top: -15px;
margin-bottom: 15px;
color: #777;
diff --git a/frontend/coprs_frontend/coprs/templates/api.html
b/frontend/coprs_frontend/coprs/templates/api.html
index 2d41745..66f7f48 100644
--- a/frontend/coprs_frontend/coprs/templates/api.html
+++ b/frontend/coprs_frontend/coprs/templates/api.html
@@ -191,6 +191,7 @@ copr_url =
http://copr.fedoraproject.org
<h4>Parameters sent by POST:</h4>
<ul>
<li><b>pkgs</b> – Space separated list of package
URLs (SRPMs) to be built</li>
+ <li><b>chroots</b> – (Optional) Chroots for this
particular build (in case you do not need all project's chroots), specified as
<span style="font-style:italic">chrootname=y</span>
</ul>
<h4>Example results</h4>
diff --git a/frontend/coprs_frontend/coprs/templates/coprs/detail/_builds_forms.html
b/frontend/coprs_frontend/coprs/templates/coprs/detail/_builds_forms.html
index 7331575..4023881 100644
--- a/frontend/coprs_frontend/coprs/templates/coprs/detail/_builds_forms.html
+++ b/frontend/coprs_frontend/coprs/templates/coprs/detail/_builds_forms.html
@@ -4,7 +4,7 @@
<form action="{{ url_for(view, username=copr.owner.name, coprname=copr.name)
}}" method="post">
<dl>
<dt class="field-label">Build for all project's
chroots?</dt>
- <dl class="field-label-help"> Applies just to these builds and will
not cause any change to your project. </dl>
+ <dd class="field-label-help">Applies just to these builds and will
not cause any changes to your project. </dd>
{% if form._mock_chroots_error %}
<p class="form-error">{{ form._mock_chroots_error }}</p>