[asdf-devel] asdf-version

Faré fahree at gmail.com
Sun Mar 14 01:36:23 UTC 2010


On 13 March 2010 16:56, Robert Goldman <rpgoldman at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: version.lisp
Type: application/octet-stream
Size: 1749 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20100313/b835ad8f/attachment.obj>


More information about the asdf-devel mailing list