|
SA Bugzilla – Full Text Bug Listing |
Summary: | RFE: support "3.1.7"-style version numbering in 'require_version' | ||
---|---|---|---|
Product: | Spamassassin | Reporter: | Klaus Heinz <heinz> |
Component: | Libraries | Assignee: | SpamAssassin Developer Mailing List <dev> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | apache |
Priority: | P5 | ||
Version: | SVN Trunk (Latest Devel Version) | ||
Target Milestone: | Future | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Klaus Heinz
2004-07-03 14:49:05 UTC
There's the internal version (x.yyyzzz) which is used in require_version (I've added some documentation about this in the POD) and for CPAN, etc. Then there's the user-visible version (x.y.z{-anything}). They are, unfortunatly, both required to be in different formats. "3.0" isn't a valid version number in and of itself (does it mean "3.0.0" or "3.0.#"?) I was thinking about having "require_version" understand the latter there, so "require_version 3.1" would work for all 3.1 versions, but the code doesn't support it yet. I'd probably end up making a function "version_gen_to_int" or something which takes some value that should be considered a version, and convert it into the internal x.yyyzzz number format. ie: it's the reverse of M::SA::Version(). Then: 3.0 -> 3.000 3.0.0-pre1 -> 3.000000 randomjunk -> randomjunk (act as a pass through) 3 -> 3. Then instead of "required ne current" we do some form of "substr(current,0,length required) ne required". Good plan. Some code which handles both the x.y.z and the x.yyyzzz variant can be found in the first foreach loop of spamc/version.h.pl. move bug to Future milestone (previously set to Future -- I hope) this'd be nice but without code it's not going to make it into 3.2.0 really move this time lowering priority moving most remaining 3.3.0 bugs to 3.3.1 milestone reassigning, too moving all open 3.3.1 bugs to 3.3.2 Moving back off of Security, which got changed by accident during the mass Target Milestone move. I see no point changing how require_version works, it's mainly for SA internal use anyway, no point changing the way it works. Just use "if (version >= 3.0)" etc for general use. Closing. |