Loading src/clpm/cli/bundle/install.lisp +2 −2 Original line number Diff line number Diff line Loading @@ -86,13 +86,13 @@ correct commit." (sources (clpmfile/user-global-sources clpmfile)) lockfile) (log:info "clpmfile located at ~S" clpmfile-pathname) (log:info "syncing sources") (mapc #'sync-source sources) ;; Get the lock file (if (probe-file lockfile-pathname) (setf lockfile (read-lockfile lockfile-pathname)) (progn ;; The lock file doesn't exist. Create it! (log:info "syncing sources") (mapc #'sync-source sources) (log:info "Creating lockfile") (setf lockfile (build-lockfile clpmfile)) (with-open-file (s lockfile-pathname Loading src/clpm/clpmfile.lisp +1 −2 Original line number Diff line number Diff line Loading @@ -285,8 +285,7 @@ sources." (let* ((source (find source (clpmfile/user-global-sources (lockfile/clpmfile lockfile)) :key #'source/name :test #'equal)) (project (source/project source name)) (release (project/release project version))) (release (source/project-release source name version))) (dolist (system-file-name system-files) (push (release/system-file release system-file-name) (lockfile/system-files lockfile))) lockfile)) Loading src/clpm/sources/defs.lisp +4 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ #:source/lib-directory #:source/name #:source/project #:source/project-release #:source/projects #:source/system #:source/systems Loading Loading @@ -141,6 +142,9 @@ initargs and a :type as a keyword.")) (:documentation "Return an instance of CLPM-PROJECT or NIL if the project is not located in the source.")) (defgeneric source/project-release (source project-name version-string) (:documentation "Return a release object for the specified project and version.")) (defgeneric source/system (source system-name) (:documentation "Return an instance of CLPM-SYSTEM or NIL if the system is not located in the source.")) Loading src/clpm/sources/quicklisp.lisp +19 −9 Original line number Diff line number Diff line Loading @@ -37,6 +37,8 @@ :accessor ql-curation-p) (versions-url :accessor source/versions-url) (all-versions :accessor source/all-versions) (projects :initform nil :accessor source/raw-projects) Loading Loading @@ -87,6 +89,9 @@ path)) (source/url source))))) (defmethod slot-unbound (class (source quicklisp-source) (slot-name (eql 'all-versions))) (setf (source/all-versions source) (latest-all-versions source))) (defmethod source-type-keyword ((source quicklisp-source)) :quicklisp) Loading Loading @@ -121,6 +126,10 @@ project)) project)) (defmethod source/project-release ((source quicklisp-source) project-name version-string) (ensure-version-synced! source version-string) (project/release (source/project source project-name) version-string)) (defun ensure-systems (source) (mapc (curry #'source/system source) (source/system-names source))) Loading Loading @@ -490,8 +499,9 @@ version of the distribution to the directory specified by DEST-DIR." (defun ensure-version-synced! (source version) (check-type source quicklisp-source) (unless (member (car version) (source/dist-versions source) :key #'car :test #'equal) (unless (member version (source/dist-versions source) :key #'car :test #'equal) (log:info "Syncing version ~S~%" version) (let ((version (assoc version (source/all-versions source) :test #'equal))) (push version (getf (source/db source) :versions)) (setf (getf (source/db source) :releases) (assemble-release-db (source/cache-directory source) Loading @@ -501,13 +511,13 @@ version of the distribution to the directory specified by DEST-DIR." (setf (getf (source/db source) :systems) (assemble-systems-db (getf (source/db source) :releases))) (save-db source) t)) t))) (defmethod sync-source ((source quicklisp-source)) (let* ((latest-versions (latest-all-versions source)) (let* ((latest-versions (source/all-versions source)) (changed-p nil)) (dolist (v latest-versions) (setf changed-p (or (ensure-version-synced! source v) changed-p))) (setf changed-p (or (ensure-version-synced! source (car v)) changed-p))) t)) Loading Loading
src/clpm/cli/bundle/install.lisp +2 −2 Original line number Diff line number Diff line Loading @@ -86,13 +86,13 @@ correct commit." (sources (clpmfile/user-global-sources clpmfile)) lockfile) (log:info "clpmfile located at ~S" clpmfile-pathname) (log:info "syncing sources") (mapc #'sync-source sources) ;; Get the lock file (if (probe-file lockfile-pathname) (setf lockfile (read-lockfile lockfile-pathname)) (progn ;; The lock file doesn't exist. Create it! (log:info "syncing sources") (mapc #'sync-source sources) (log:info "Creating lockfile") (setf lockfile (build-lockfile clpmfile)) (with-open-file (s lockfile-pathname Loading
src/clpm/clpmfile.lisp +1 −2 Original line number Diff line number Diff line Loading @@ -285,8 +285,7 @@ sources." (let* ((source (find source (clpmfile/user-global-sources (lockfile/clpmfile lockfile)) :key #'source/name :test #'equal)) (project (source/project source name)) (release (project/release project version))) (release (source/project-release source name version))) (dolist (system-file-name system-files) (push (release/system-file release system-file-name) (lockfile/system-files lockfile))) lockfile)) Loading
src/clpm/sources/defs.lisp +4 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ #:source/lib-directory #:source/name #:source/project #:source/project-release #:source/projects #:source/system #:source/systems Loading Loading @@ -141,6 +142,9 @@ initargs and a :type as a keyword.")) (:documentation "Return an instance of CLPM-PROJECT or NIL if the project is not located in the source.")) (defgeneric source/project-release (source project-name version-string) (:documentation "Return a release object for the specified project and version.")) (defgeneric source/system (source system-name) (:documentation "Return an instance of CLPM-SYSTEM or NIL if the system is not located in the source.")) Loading
src/clpm/sources/quicklisp.lisp +19 −9 Original line number Diff line number Diff line Loading @@ -37,6 +37,8 @@ :accessor ql-curation-p) (versions-url :accessor source/versions-url) (all-versions :accessor source/all-versions) (projects :initform nil :accessor source/raw-projects) Loading Loading @@ -87,6 +89,9 @@ path)) (source/url source))))) (defmethod slot-unbound (class (source quicklisp-source) (slot-name (eql 'all-versions))) (setf (source/all-versions source) (latest-all-versions source))) (defmethod source-type-keyword ((source quicklisp-source)) :quicklisp) Loading Loading @@ -121,6 +126,10 @@ project)) project)) (defmethod source/project-release ((source quicklisp-source) project-name version-string) (ensure-version-synced! source version-string) (project/release (source/project source project-name) version-string)) (defun ensure-systems (source) (mapc (curry #'source/system source) (source/system-names source))) Loading Loading @@ -490,8 +499,9 @@ version of the distribution to the directory specified by DEST-DIR." (defun ensure-version-synced! (source version) (check-type source quicklisp-source) (unless (member (car version) (source/dist-versions source) :key #'car :test #'equal) (unless (member version (source/dist-versions source) :key #'car :test #'equal) (log:info "Syncing version ~S~%" version) (let ((version (assoc version (source/all-versions source) :test #'equal))) (push version (getf (source/db source) :versions)) (setf (getf (source/db source) :releases) (assemble-release-db (source/cache-directory source) Loading @@ -501,13 +511,13 @@ version of the distribution to the directory specified by DEST-DIR." (setf (getf (source/db source) :systems) (assemble-systems-db (getf (source/db source) :releases))) (save-db source) t)) t))) (defmethod sync-source ((source quicklisp-source)) (let* ((latest-versions (latest-all-versions source)) (let* ((latest-versions (source/all-versions source)) (changed-p nil)) (dolist (v latest-versions) (setf changed-p (or (ensure-version-synced! source v) changed-p))) (setf changed-p (or (ensure-version-synced! source (car v)) changed-p))) t)) Loading