quicklisp / quicklisp-client

Quicklisp client.
http://www.quicklisp.org/
MIT License
298 stars 75 forks source link

Install specific dist version #193

Closed Zulu-Inuoe closed 4 years ago

Zulu-Inuoe commented 4 years ago

I had the need to install/rollback a specific ql dist version and came across this blog post to do it: http://blog.quicklisp.org/2011/08/going-back-in-dist-time.html

I wrote this helper function to use personally and somebody suggested it might be useful to incorporate this into the quicklisp-client codebase:

(defun ql-install-version (version &optional dist)
  "Install `version' for dist `dist'"
  (let* ((dist (or (ql-dist:dist (or dist "quicklisp"))
                   (error "Can't find dist ~A" dist)))
         (pair (find version (ql-dist:available-versions dist) :key #'car :test #'string-equal)))
    (unless pair
      (error "Can't find dist ~A version ~A" dist version))
    (ql-dist:install-dist (cdr pair) :replace t)))

Thanks.

quicklisp commented 4 years ago

Thanks for sharing. I am not going to add something like this but it may help when someone is searching in the future.