public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/3506] New: strverscmp misbehaves with additional text after the version number
@ 2006-11-11 17:00 guichaz at yahoo dot fr
  2006-11-27 15:26 ` [Bug libc/3506] " jakub at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: guichaz at yahoo dot fr @ 2006-11-11 17:00 UTC (permalink / raw)
  To: glibc-bugs

strverscmp("gliv-1.0", "gliv-1.0.1") => -46 => Good
strverscmp("gliv-1.0.tar.gz", "gliv-1.0.1.tar.gz") => 67 => Bad
Given that strverscmp is mainly used to sort filenames of versionned projects,
it should apply the same order with or without a suffix.

-- 
           Summary: strverscmp misbehaves with additional text after the
                    version number
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: guichaz at yahoo dot fr
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=3506

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/3506] strverscmp misbehaves with additional text after the version number
  2006-11-11 17:00 [Bug libc/3506] New: strverscmp misbehaves with additional text after the version number guichaz at yahoo dot fr
@ 2006-11-27 15:26 ` jakub at redhat dot com
  2006-12-03 13:52 ` guichaz at yahoo dot fr
  2007-02-16  7:33 ` drepper at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at redhat dot com @ 2006-11-27 15:26 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jakub at redhat dot com  2006-11-27 15:25 -------
The strverscmp function really can't change at this point, it is well documented
how it behaves and programs rely on its behavior.  strverscmp only cares about
the longest substring containing consecutive digits around the first differing
byte, so not even dots mean anything to it.
You are looking for a function like rpmvercmp in <rpm/rpmlib.h> which provides
segmented comparison.  But why should that be in libc?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


http://sourceware.org/bugzilla/show_bug.cgi?id=3506

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/3506] strverscmp misbehaves with additional text after the version number
  2006-11-11 17:00 [Bug libc/3506] New: strverscmp misbehaves with additional text after the version number guichaz at yahoo dot fr
  2006-11-27 15:26 ` [Bug libc/3506] " jakub at redhat dot com
@ 2006-12-03 13:52 ` guichaz at yahoo dot fr
  2007-02-16  7:33 ` drepper at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: guichaz at yahoo dot fr @ 2006-12-03 13:52 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From guichaz at yahoo dot fr  2006-12-03 13:52 -------
Thanks for pointing me out rpmvercmp. If you don't want to change the strverscmp
behaviour, then the bug should be closed I think.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=3506

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/3506] strverscmp misbehaves with additional text after the version number
  2006-11-11 17:00 [Bug libc/3506] New: strverscmp misbehaves with additional text after the version number guichaz at yahoo dot fr
  2006-11-27 15:26 ` [Bug libc/3506] " jakub at redhat dot com
  2006-12-03 13:52 ` guichaz at yahoo dot fr
@ 2007-02-16  7:33 ` drepper at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: drepper at redhat dot com @ 2007-02-16  7:33 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2007-02-16 07:33 -------
strverscmp cannot be changed.  And it's simply not meant to do the kind of
comparisons you expect it to do.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |WORKSFORME


http://sourceware.org/bugzilla/show_bug.cgi?id=3506

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-02-16  7:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-11 17:00 [Bug libc/3506] New: strverscmp misbehaves with additional text after the version number guichaz at yahoo dot fr
2006-11-27 15:26 ` [Bug libc/3506] " jakub at redhat dot com
2006-12-03 13:52 ` guichaz at yahoo dot fr
2007-02-16  7:33 ` drepper at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).