[Dctrl-tools-devel] Bug#559543: sort-dctrl: doesn't take into account secondary sorting criteria

Ryan Niebur ryan at debian.org
Sat Dec 5 09:32:02 UTC 2009


Package: dctrl-tools
Version: 2.13.1
Severity: normal

Hi!

The man page says this:
      sort-dctrl -k Package,Version:v /var/lib/dpkg/available
              Output the dpkg available file sorted primarily in ascending order of package names and secondarily in descending order of version numbers.

However, as shown in the example below (running tbl-dctrl not needed,
but aids in seeing the for me), sort-dctrl completely ignores the
secondary sorting criteria. The "id: 5" record should come after the
"id: 3" record, not before it.

bash jade ~ $ cat test.dctrl
id: 1
priority: 1

id: 2
priority: 2

id: 5
priority: 1

id: 4
priority: 2

id: 3
priority: 1
bash jade ~ $ cat test.dctrl | sort-dctrl -kpriority:nr,id:nr | tbl-dctrl -c priority -c id
+==========+====+
| priority | id |
+----------+----+
| 2        | 2  |
| 2        | 4  |
| 1        | 1  |
| 1        | 5  |
| 1        | 3  |
+==========+====+
bash jade ~ $ 

Cheers,
Ryan

-- 
_________________________
Ryan Niebur
ryanryan52 at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/dctrl-tools-devel/attachments/20091205/012725ea/attachment.pgp>


More information about the Dctrl-tools-devel mailing list