Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 373661

Summary: versionator.eclass: Update to match PMS's version sorting behavior
Product: Gentoo Linux Reporter: Jonathan Callen (RETIRED) <jcallen>
Component: EclassesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 174542    
Attachments: Patch for versionator.eclass

Description Jonathan Callen (RETIRED) gentoo-dev 2011-07-01 00:54:59 UTC
Created attachment 278745 [details, diff]
Patch for versionator.eclass

Currently, versionator.eclass has a few flaws in it's behavior when comparing version strings. For example, it only supports one _alpha/_beta/_rc/_pre/_p/-r suffix, and it treats versions like "1.010" and "1.2.0" incorrectly (when comparing to "1.1" (should be *less*, versionator says *greater*) and "1.2" (should be *greater*, versionator says *equal*), respectively).

Attached is a patch that fixes the logic to match PMS, as well as fixing a couple test cases and adding a bunch more, pulled from portage's and paludis's testsuites.
Comment 1 SpanKY gentoo-dev 2011-07-01 02:18:21 UTC
base-system took over versionator.eclass once ciaranm left as it was the only logical group for it.  this is clearly reflected in the commit history.

if you're comfortable with hacking on it, then i'd say feel free to commit to it
Comment 2 Jonathan Callen (RETIRED) gentoo-dev 2011-07-21 20:20:16 UTC
I committed this a while ago.