openSUSE / osc

The Command Line Interface to work with an Open Build Service
http://openbuildservice.org/
GNU General Public License v2.0
170 stars 185 forks source link

"osc gebinaries" prints downloaded packages percent-quoted #1650

Closed mwilck closed 2 weeks ago

mwilck commented 3 weeks ago

osc getbinaries unnecessarily percent-escapes the + character in its log output, making the filenames hardly readable.

Observed:

> osc getbinaries -d /tmp/x standard x86_64
_buildenv
_statistics
kpartx-0.10.0%2B106%2Bsuse.ffbdb7a-150700.3.1.x86_64.rpm
libdmmp-devel-0.10.0%2B106%2Bsuse.ffbdb7a-150700.3.1.x86_64.rpm
libdmmp0_2_0-0.10.0%2B106%2Bsuse.ffbdb7a-150700.3.1.x86_64.rpm
libmpath0-0.10.0%2B106%2Bsuse.ffbdb7a-150700.3.1.x86_64.rpm
multipath-tools-0.10.0%2B106%2Bsuse.ffbdb7a-150700.3.1.x86_64.rpm
multipath-tools-devel-0.10.0%2B106%2Bsuse.ffbdb7a-150700.3.1.x86_64.rpm
rpmlint.log

Expected:

> osc getbinaries -d /tmp/x standard x86_64
_buildenv
_statistics
kpartx-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm
libdmmp-devel-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm
libmpath0-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm
multipath-tools-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm
multipath-tools-devel-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm
rpmlint.log

The actual file names are correct, they're just logged by "getbinaries" in this way. osc ls -b also prints correct file names.

> osc ls -b -r standard -a x86_64
_buildenv
_statistics
kpartx-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm
kpartx-debuginfo-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm
libdmmp-devel-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm
libdmmp0_2_0-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm
libdmmp0_2_0-debuginfo-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm
libmpath0-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm
libmpath0-debuginfo-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm
multipath-tools-0.10.0+106+suse.ffbdb7a-150700.3.1.src.rpm
multipath-tools-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm
multipath-tools-debuginfo-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm
multipath-tools-debugsource-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm
multipath-tools-devel-0.10.0+106+suse.ffbdb7a-150700.3.1.x86_64.rpm

Versions

Steps to reproduce the behavior: Should happen with any package using + in the version number. Examples are multipath-tools and dracut.

Expected behavior See above

dmach commented 2 weeks ago

@mwilck the linked PR fixes this and there's also a bonus! (Let me know how you like the disappearing progressbar after the download completes)

mwilck commented 2 weeks ago

Thanks! I don't care too much about the progress bar.