#86 gdl_version_ge: utility to check order of GDL versions

closed
nobody
None
5
2011-05-11
2010-12-30
No

Since GDL is still in very active development, it can be useful
to execute something contingent on whether or not the GDL version
is recent enough. A fallback block can be used if the version
is too old for the desired feature. As of (at least), gdl-0.9.0, we can use
string(!GDL,/print,format='(a)') to get the version string.
However, alphabetical comparison of versions fails with '~rc' versions
(because '.' lt '~' on at least my system, so '0.9.0' lt '0.9~rc3'), which is wrong.
Also, if a component of the GDL version numbers ever gets
beyond 9, then we would have e.g. '0.9.13' lt '0.9.2' , which again is wrong.

It would presumably be possible to port something highly intelligent
and well-tested, used by GPL packet management systems
(e.g. aptitude?) into GDL, but pending that, i wrote up a quick hack
here.

This is complementary to Laurent's running_gdl routine in the requested
feature list:
https://sourceforge.net/tracker/index.php?func=detail&aid=2997535&group_id=97659&atid=618686

[Version 1.1 of running_gdl should be updated to report details of the
!GDL string, but the changes to make are reasonably easy, and i'll comment
over on that thread.]

Here is a similar 2005 request, which should be linked here, or else
closed:
https://sourceforge.net/tracker/index.php?func=detail&aid=1216778&group_id=97659&atid=618686

boud

Discussion

  • Boud Roukema

    Boud Roukema - 2010-12-30

    version 1.0 of gdl_version_ge and associated routines

     
  • Boud Roukema

    Boud Roukema - 2010-12-30

    The 2005 request *is* closed - so ignore the last paragraph of "Details".

     
  • Sylwester Arabas

    I do agree it might be a useful utility in some cases, but do we see a reason to put it into the GDL source tree? Please do comment.

    S.

     
  • Sylwester Arabas

    • status: open --> pending
     
  • SourceForge Robot

    • status: pending --> closed
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks