Bug 7095 - Don't assume versions are numeric
Summary: Don't assume versions are numeric
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: PC Linux
: P2 major
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-26 16:46 UTC by jidanni
Modified: 2018-08-22 04:41 UTC (History)
2 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description jidanni 2014-10-26 16:46:53 UTC
warn: Argument "0.80_2" isn't numeric in numeric lt (<) at  Mail/SpamAssassin/Dns.pm line 521.
warn: Argument "0.80_2" isn't numeric in numeric ge (>=) at Mail/SpamAssassin/Plugin/AskDNS.pm line 214.
Comment 1 Karsten Bräckelmann 2014-10-26 19:19:40 UTC
It seems there are Net::DNS tarballs published accidentally, and the Net::DNS authors actually consider them pre-release beta.

See http://perldoc.perl.org/perlmodstyle.html section Release Considerations, Version Numbering:

 "A correct CPAN version number is a floating point number with at least
  2 digits after the decimal."

 "If you want to release a 'beta' or 'alpha' version of a module but
  don't want CPAN.pm to list it as most recent use an '_' after the
  regular version number followed by at least 2 digits, eg. 1.20_01."

Even search.cpan.org gets confused by this, showing an inconsistent mix of 0.80 and 0.80_2 in URIs and text.

I believe this should be raises with the Net::DNS team instead. Looking at the archive of their previous tarballs, they did follow the two digits rule before.
Comment 2 jidanni 2014-10-26 20:05:40 UTC
Well all I can say is if you feel they are wrong, feel free to file a bug with them.
Comment 3 Karsten Bräckelmann 2014-10-26 20:28:02 UTC
The Net::DNS project's site net-dns.org currently states the "current release version of Net::DNS is: 0.80". Moreover, their blog post as of Oct 24 mentions a release candidate for Net::DNS 0.81, linked to the 0.80_2 tarball.

Closing RESOLVED INVALID.
Comment 4 Karsten Bräckelmann 2014-10-26 23:18:24 UTC
FWIW, despite some textual version confusion, CPAN still links to the latest stable 0.80 source.

This issue is caused by Debian packaging a pre-release tarball on Oct 24, whereas they exclusively packaged stable releases before. See

  https://packages.qa.debian.org/libn/libnet-dns-perl.html

In particular note the 0.80.2-x releases and compare to all previous versions not including a micro version number. libnet-dns-perl_0.80.2 actually contains pre-release Net::DNS 0.80_2, an 0.80.2 version as the deb claims does not exist.
Comment 5 Kevin A. McGrail 2018-08-22 04:41:50 UTC
the minor fix from Damyan Ivanov <dam@debian.org> seems like a valid and robust fix for this issue.  likely already fixed in libnet-dns-perl too but it's a minor change

Even if I think this is a non-issue it's a simple fix.

Committed revision 1838604.
Committed revision 1838605.