Upload progress bar for copr-cli

Sergio Oliveira seocam at gmail.com
Thu Oct 22 18:57:31 UTC 2015


The attached patch implements a progress bar for uploading SRPMs.

Basically I've added a new "progress_callback" parameters to the
create_new_build (copr/python) function which is called for each chunk of
8192 bytes sent to the server. Then I've implemented the callback on the
copr-cli to update a bar object.

The bar format and library is the same than pip uses (see the screenshot
attached).[image: ss_progressbar.jpg] The lib I've used is available in the
fedora package python-progress but it's not available in EPEL. For that
reason I did not made that a hard dependency: if the python-progress is
installed the bar will show up, if not the lib just work as previously.

Is it possible to add python-progress to EPEL repo? If so I'd change the
spec to make copr-cli depend on it.

Cheers,

Sergio Oliveira
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/copr-devel/attachments/20151022/006de9e7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ss_progressbar.jpg
Type: image/jpeg
Size: 64479 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/copr-devel/attachments/20151022/006de9e7/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Display-progress-bar-if-python-progress-is-available.patch
Type: application/octet-stream
Size: 5160 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/copr-devel/attachments/20151022/006de9e7/attachment-0001.obj>


More information about the copr-devel mailing list