[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue with ls -v / sort -V and strverscmp() usage

From: Ondřej Vašík
Subject: Issue with ls -v / sort -V and strverscmp() usage
Date: Wed, 03 Sep 2008 12:52:57 +0200

as reported in RH bugzilla #253817
(https://bugzilla.redhat.com/show_bug.cgi?id=253817), there is an issue
with ls -v (and there will be same issue with sort -V soon). Problem is
with sorting files with extensions or dist-tags (like .tar.gz)
because .tar.gz is more than .1.tar.gz. Therefore foo-5.0.tar.gz will be
considered as later version than foo-5.0.1.tar.gz . As ls -v and sort -V
now use glibc strverscmp() and this function is not going to change
(http://sourceware.org/bugzilla/show_bug.cgi?id=3506) , I would like to
know your opinion how to solve the issue. I see several possible ways
how to solve it: 
1) keep it as it is and document those limitations
2) to use gnulib strverscmp() for ls -v and sort -V and to modify it
somehow to handle such cases correctly
3) to use/create different function for handling version sort (like
rpmvercmp in <rpm/rpmlib.h> recommended in glibc strverscmp() bugzilla)

Which way do you like? Or do you have different ideas?

         Ondrej Vasik

Attachment: signature.asc
Description: Toto je digitálně podepsaná část zprávy

reply via email to

[Prev in Thread] Current Thread [Next in Thread]