rpm-sort(8) is intended for use in shell scripts.  sort(1) is not RPM 
versioning-aware, and attempting to work around that is fraught. Instead, 
provide a wrapper around rpmvercmp() using qsort().

Fedora's grub2 has carried a version of this since 2015, and a more complex 
version was also part of the grubby project (provided at 
/usr/libexec/grubby/rpm-sort) since 2018.  This version has been simplified and 
adapted to the RPM project.

Also-authored-by: Peter Jones <pjo...@redhat.com>
Signed-off-by: Peter Jones <pjo...@redhat.com>
Signed-off-by: Robbie Harwood <rharw...@redhat.com>
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2249

-- Commit Summary --

  * Add rpm-sort utiliy for sorting RPM versions

-- File Changes --

    M CMakeLists.txt (2)
    M docs/man/CMakeLists.txt (2)
    M docs/man/index.md (1)
    A docs/man/rpm-sort.8.md (38)
    A rpm-sort.c (222)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2249.patch
https://github.com/rpm-software-management/rpm/pull/2249.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2249
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to