[Top][All Lists]

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

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

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

Bruno Haible wrote:
> Ondřej Vašík wrote:
> > 3) to use/create different function for handling version sort (like
> > rpmvercmp in <rpm/rpmlib.h> recommended in glibc strverscmp() bugzilla)
> Does rpmvercmp have the above property?

Similar. It separates name, epoch, version, release and architecture and
compares those. Uses subsections of alphanum segments separated by
non-alphanum chars. When same segment have different types, numeric is
always considered as newer than alpha or alphanum. This solves issue
with suffix, but changes behaviour for prefix (name) - as fully numeric
project/file name will be considered as "newer" than alphanum
project/file name and will be listed after alphanumeric names.

         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]