Issue #1829 has been updated by masterzen. Category set to functions Status changed from Unreviewed to Ready for Checkin Assigned to changed from masterzen to jamtur01 % Done changed from 0 to 100 Complexity changed from Unknown to Trivial Keywords set to language function version
tstoop wrote: > It would be nice to have a way to compare versions. So one can do something > like this reliably: And here it is: in the tickets/0.24.x/1829 branch, to be applied after the fix in #1807: http://github.com/masterzen/puppet/tree/tickets/0.24.x/1829 Usage: $out = versioncmp(v1,v2) The function returns < 0 is v! < v2, > 0 if v1 > v2 and 0 if v1==v2 ---------------------------------------- Feature #1829: A function to compare versions http://projects.reductivelabs.com/issues/show/1829 Author: tstoop Status: Ready for Checkin Priority: Normal Assigned to: jamtur01 Category: functions Target version: Complexity: Trivial Affected version: 0.24.6 Keywords: language function version It would be nice to have a way to compare versions. So one can do something like this reliably: <pre>if $puppetversion > 0.24.7 { donkey }</pre> Not sure how this would be implemented, maybe something like: <pre>if version_larger_than($puppetversion, "0.24.7") { mule }</pre> Or maybe that the operators themselves can recognise versions? ---------------------------------------- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://reductivelabs.com/redmine/my/account --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en -~----------~----~----~----~------~----~------~--~---
