Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • At least, not that I know of.

    The simple reason is the algorithm that the FreeBSD Ports system uses to compare version numbers ( pkg_version(1) []). It can handle stuff like 0.01 < 0.02 and 0.99 < 1.01, but when an author, instead of incrementing the version number, just sticks another digit on the end, the version number comparison gets into trouble. Or more exactly, the trouble arises when that digit is removed. So 1.86 < 1.861, but 1.861 > 1.87! Not good.

    In order to alleviate this problem, the ports maintainer can choose to rewrite the version number used in the ports dependency calculations, to make it compatible with the comparison algorithm. E.g. '3Beta7-pre2' becomes '3.b7.p2', and '1.861' becomes '1.86.1'. Since 1.86.1 < 1.87, we have avoided the problem.

    Also note, that we do not change the version number in the module; only in the ports system. So code like "use Email::Address 1.871;" continues to work as usual.

    So, as you can see, FreeBSD as no intention of usurping power over the version numbers; we are merely trying to evening out the impedance mismatches, and keeping everybody's systems going smoothly.

    I bet that there are other packaging systems out there with similar difficulties, when it comes to universally correct version number comparison. For this reason, I would recommend module authors to stick with the simplest possible version numbering.

    FreeBSD committer and ports maintainer of several Email::* modules
    • Thanks, that's nice and clear. I know FreeBSD isn't messing with the code for modules I maintain, unlike some OTHER distributions I could name. They probably have made me grumpier than I need to be.

      My code is always X.YYY, except for Bundle modules, which are always of a different fixed digit format. This should be true of most PEP things, especially once it's standardized.

      Feel free to keep doing what you're doing, of course. I'm just letting you know that I am not one of those lunatics who goes from 1.