FS#44121 - [pacman] Output of pacsort is unreadable

Attached to Project: Pacman
Opened by lesebas (lesebas) - Monday, 09 March 2015, 21:06 GMT
Last edited by Allan McRae (Allan) - Thursday, 05 May 2016, 03:59 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version 5.0.0
Due in Version 5.1.0
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

When I try to use pacsort to sort different package the output is only unreadable char.


Steps to reproduce:

pacsort -f pkgver1 pkgver2

see output on my system with following command :


pacsort --files /var/cache/pacman/pkg/a52dec-0.7.4-7-x86_64.pkg.tar.xz /var/cache/pacman/pkg/a52dec-0.7.4-8-x86_64.pkg.tar.xz > output_pacsort
This task depends upon

Closed by  Allan McRae (Allan)
Thursday, 05 May 2016, 03:59 GMT
Reason for closing:  Implemented
Additional comments about closing:  Improved help output in git commit 6c96ad36
Comment by Dave Reisner (falconindy) - Monday, 09 March 2015, 22:12 GMT
Much like sort(1), pacsort reads from standard input, or from the files passed as arguments. What you wanted to type was:

printf '%s\n' /var/cache/pacman/pkg/a52dec-0.7.4-7-x86_64.pkg.tar.xz /var/cache/pacman/pkg/a52dec-0.7.4-8-x86_64.pkg.tar.xz | pacsort --files
Comment by Allan McRae (Allan) - Tuesday, 10 March 2015, 00:26 GMT
I think we need to make this clearer in the --help output
Comment by lesebas (lesebas) - Tuesday, 10 March 2015, 07:39 GMT
Hello, that's exactly what I was about to write. The help context is very confusing :

$ pacsort -h
pacsort (pacman) v4.2.1

A sort utility implementing alpm_pkg_vercmp.

Usage: pacsort [options] [files...]

-f, --files assume inputs are file paths of packages
-h, --help display this help message
-k, --key <index> sort input starting on specified column
-r, --reverse sort in reverse order (default: oldest to newest)
-t, --separator <sep> specify field separator (default: space)
-z, --null lines end with null bytes, not newlines

What I understand is that I have to add the file list with space after options.

Loading...