Skip to content

Commit b249072

Browse files
committed
Add QL:DIST-VERSION and QL:DIST-URL.
1 parent 259a8d1 commit b249072

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

quicklisp/dist.lisp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,3 +1085,27 @@ FUN."
10851085
(split-spaces line)
10861086
(setf versions (acons version url versions)))))
10871087
versions)))
1088+
1089+
1090+
;;;
1091+
;;; User interface bits to re-export from QL
1092+
;;;
1093+
1094+
(define-condition unknown-dist (error)
1095+
((name
1096+
:initarg :name
1097+
:reader unknown-dist-name))
1098+
(:report (lambda (condition stream)
1099+
(format stream "No dist known by that name -- ~S"
1100+
(unknown-dist-name condition)))))
1101+
1102+
(defun find-dist-or-lose (name)
1103+
(let ((dist (find-dist name)))
1104+
(or dist
1105+
(error 'unknown-dist :name name))))
1106+
1107+
(defun dist-url (name)
1108+
(canonical-distinfo-url (find-dist-or-lose name)))
1109+
1110+
(defun dist-version (name)
1111+
(version (find-dist-or-lose name)))

quicklisp/package.lisp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@
237237
#:system-definition-searcher
238238
#:system-apropos
239239
#:dependency-tree
240-
#:clean))
240+
#:clean
241+
#:unknown-dist))
241242

242243
(defpackage #:ql-dist-user
243244
(:documentation
@@ -261,6 +262,11 @@
261262
#:ql-minitar
262263
#:ql-gunzipper)
263264
(:shadow #:uninstall)
265+
(:shadowing-import-from #:ql-dist
266+
#:dist-version
267+
#:dist-url)
268+
(:export #:dist-version
269+
#:dist-url)
264270
(:export #:quickload
265271
#:*quickload-prompt*
266272
#:*quickload-verbose*

0 commit comments

Comments
 (0)