On 13 March 2010 16:56, Robert Goldman rpgoldman@sift.info wrote:
On 3/13/10 Mar 13 -1:12 PM, Faré wrote:
We could adopt the same algorithm as dpkg or rpm uses for comparing version.
I once implemented it in shell script. Could do it in Lisp...
I confess to not really knowing this algorithm (I haven't built an RPM in a long time), nor having any guess about whether or not it would break previous :version dependencies.
See attached file (supposes ASCII, will fail on EBCDIC). Add:
(defun version<= (v1 v2) (ecase (compare-rpm-versions v1 v2) ((< =) t) ((> nil) nil))) (defmethod version-satisfies ((v string) (vmin string)) (version<= vmin v))
Do you think we should use that?
Anyone know how backward compatible this would be?
It's backwards compatible with the current version-satisfies indeed.
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] The whole modern world has divided itself into Conservatives and Progressives. The business of Progressives is to go on making mistakes. The business of the Conservatives is to prevent the mistakes from being corrected. — G.K. Chesterton