Commit a8d2f57f authored by Eric Timmons's avatar Eric Timmons
Browse files

Remove :force-https option to quicklisp sources

Just make the user put https:// if they care. Optionally, add a config option
later to force the scheme globally to https.
parent f180d1cb
...@@ -34,16 +34,11 @@ ...@@ -34,16 +34,11 @@
:reader source-name) :reader source-name)
(url (url
:initarg :url :initarg :url
:accessor ql-flat-source-url) :accessor ql-flat-source-url)))
(force-https
:initarg :force-https
:initform nil
:accessor ql-flat-source-force-https)))
(defmethod initialize-instance :after ((source ql-flat-source) (defmethod initialize-instance :after ((source ql-flat-source)
&rest initargs &rest initargs
&key url &key url)
force-https)
(declare (ignore initargs)) (declare (ignore initargs))
(unless url (unless url
(error "URL is required")) (error "URL is required"))
...@@ -51,17 +46,11 @@ ...@@ -51,17 +46,11 @@
(if (puri:uri-p url) (if (puri:uri-p url)
(setf url (puri:copy-uri url)) (setf url (puri:copy-uri url))
(setf url (puri:parse-uri url))) (setf url (puri:parse-uri url)))
;; If the URL is already https, set force https to be T.
(when (and (eql (puri:uri-scheme url) :https))
(setf force-https t)
(setf (ql-flat-source-force-https source) force-https))
;; If the scheme is not already https, set it to https if necessary.
(ecase force-https
(nil)
(t
(setf (puri:uri-scheme url) :https)))
(setf (ql-flat-source-url source) url))) (setf (ql-flat-source-url source) url)))
(defun ql-flat-source-https-p (source)
(eql (puri:uri-scheme (ql-flat-source-url source)) :https))
;; ** Project ;; ** Project
(defclass ql-flat-project (ff-project) (defclass ql-flat-project (ff-project)
...@@ -179,8 +168,7 @@ in the same Quicklisp distribution versions as system-release." ...@@ -179,8 +168,7 @@ in the same Quicklisp distribution versions as system-release."
(defmethod source-to-form ((source ql-flat-source)) (defmethod source-to-form ((source ql-flat-source))
(list (source-name source) (list (source-name source)
:url (uri-to-string (ql-flat-source-url source)) :url (uri-to-string (ql-flat-source-url source))
:type :quicklisp :type :quicklisp))
:force-https (ql-flat-source-force-https source)))
(defmethod system-release-> ((sr-1 ql-flat-system-release) (sr-2 ql-flat-system-release)) (defmethod system-release-> ((sr-1 ql-flat-system-release) (sr-2 ql-flat-system-release))
(release-> (system-release-release sr-1) (system-release-release sr-2))) (release-> (system-release-release sr-1) (system-release-release sr-2)))
...@@ -416,7 +404,7 @@ in the same Quicklisp distribution versions as system-release." ...@@ -416,7 +404,7 @@ in the same Quicklisp distribution versions as system-release."
(source-cache-directory source))) (source-cache-directory source)))
(repo (make-instance 'ql-repo (repo (make-instance 'ql-repo
:url (ql-flat-source-url source) :url (ql-flat-source-url source)
:force-https (ql-flat-source-force-https source) :force-https (ql-flat-source-https-p source)
:cache-pathname sync-cache-pathname)) :cache-pathname sync-cache-pathname))
(project-index-map (ql-flat-load-existing-project-index source)) (project-index-map (ql-flat-load-existing-project-index source))
(system-index-map (ql-flat-load-existing-system-index source))) (system-index-map (ql-flat-load-existing-system-index source)))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment