From mkennedy at common-lisp.net Mon Jul 9 05:11:15 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Mon, 9 Jul 2007 01:11:15 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070709051115.42E7960035@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv18076 Log Message: Initial import. Status: Vendor Tag: mkennedy Release Tags: start N lispy/LICENSE N lispy/README N lispy/lispy.asd N lispy/lispy.lisp N lispy/packages.lisp N lispy/specials.lisp N lispy/utils.lisp No conflicts created by this import From mkennedy at common-lisp.net Tue Jul 10 05:00:32 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Tue, 10 Jul 2007 01:00:32 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070710050032.AF22B32023@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv15421 Modified Files: lispy.asd lispy.lisp specials.lisp Log Message: Bootstrap tweaking --- /project/lispy/cvsroot/lispy/lispy.asd 2007/07/09 05:11:14 1.1.1.1 +++ /project/lispy/cvsroot/lispy/lispy.asd 2007/07/10 05:00:32 1.2 @@ -5,8 +5,8 @@ (defsystem #:lispy :components ((:file "packages") - (:file "specials") - (:file "utils" :depends-on ("packages" "specials")) + (:file "specials" :depends-on ("packages")) + (:file "utils" :depends-on ("specials")) (:file "lispy" :depends-on ("utils"))) :depends-on (#:drakma #:puri --- /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/09 05:11:14 1.1.1.1 +++ /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/10 05:00:32 1.2 @@ -159,14 +159,15 @@ (maphash #'(lambda (name install) (declare (ignore name)) (if (null (asdf-paths install)) - (push (merge-pathnames (root install) *lispy-pathname*) + (push (root install) paths) (dolist (path (asdf-paths install)) - (push (merge-pathnames path *lispy-pathname*) + (push path paths)))) *lispy-installation*) - (print `(dolist (path ',paths) - (pushnew path asdf:*central-registry* :test 'equal)) + (print `(let ((root (make-pathname :directory (pathname-directory *load-truename*)))) + (dolist (path ',paths) + (pushnew (merge-pathnames path root) asdf:*central-registry* :test 'equal))) stream)))) (defgeneric fetch (module)) @@ -277,7 +278,7 @@ ;;; Lispy bootstrap code (remove installation.lisp-expr, distfiles and ;;; all source directories) #+nil -(dolist (name '(drakma puri gzip-stream archive ironclad cl-fad asdf)) +(dolist (name '(drakma puri gzip-stream archive ironclad cl-fad asdf lispy)) (install (module-by-name name))) #+nil (initialize) --- /project/lispy/cvsroot/lispy/specials.lisp 2007/07/09 05:11:14 1.1.1.1 +++ /project/lispy/cvsroot/lispy/specials.lisp 2007/07/10 05:00:32 1.2 @@ -1,9 +1,16 @@ (in-package #:lispy) -(defvar *lispy-map-url* (puri:parse-uri "http://localhost/~mkennedy/lispy/map.lisp-expr")) -(defvar *lispy-pathname* (merge-pathnames "lispy/" (user-homedir-pathname))) +(defvar *lispy-map-url* (puri:parse-uri "http://common-lisp.net/project/lispy/repository/map.lisp-expr")) + +(defvar *lispy-pathname* + (make-pathname :name nil :type nil :version nil + :defaults (parse-namestring *load-truename*))) + (defvar *lispy-installation-pathname* (merge-pathnames #p"installation.lisp-expr" *lispy-pathname*)) + (defvar *lispy-asdf-config-pathname* (merge-pathnames #p"asdf-config.lisp" *lispy-pathname*)) + (defvar *lispy-distfiles-pathname* (merge-pathnames #p"distfiles/" *lispy-pathname*)) + (defvar *lispy-log-stream* t) From mkennedy at common-lisp.net Thu Jul 12 05:56:05 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Thu, 12 Jul 2007 01:56:05 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070712055605.3DB154B022@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv30086 Modified Files: lispy.asd Log Message: Initialize Lispy after loading the system. --- /project/lispy/cvsroot/lispy/lispy.asd 2007/07/10 05:00:32 1.2 +++ /project/lispy/cvsroot/lispy/lispy.asd 2007/07/12 05:56:04 1.3 @@ -3,6 +3,8 @@ (:use #:common-lisp #:asdf)) +(in-package #:lispy-system) + (defsystem #:lispy :components ((:file "packages") (:file "specials" :depends-on ("packages")) @@ -13,4 +15,7 @@ #:gzip-stream #:archive #:ironclad - #:cl-fad)) \ No newline at end of file + #:cl-fad)) + +(defmethod perform :after ((o load-op) (c (eql (find-system 'lispy)))) + (funcall (intern "INITIALIZE" (find-package "LISPY")))) From mkennedy at common-lisp.net Thu Jul 12 05:56:52 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Thu, 12 Jul 2007 01:56:52 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070712055652.11CDD4B023@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv30152 Modified Files: utils.lisp Log Message: Fix new line positioning in logger. --- /project/lispy/cvsroot/lispy/utils.lisp 2007/07/09 05:11:14 1.1.1.1 +++ /project/lispy/cvsroot/lispy/utils.lisp 2007/07/12 05:56:51 1.2 @@ -39,6 +39,7 @@ (defun log-message (name control-string &rest format-arguments) (when *lispy-log-stream* - (format *lispy-log-stream* "~A ~A: " (get-universal-time) (string-upcase name)) - (apply #'format *lispy-log-stream* (cons control-string format-arguments)) - (terpri *lispy-log-stream*))) + (format *lispy-log-stream* "~&~A ~A: ~A~%" + (get-universal-time) + (string-upcase name) + (apply #'format nil (cons control-string format-arguments))))) From mkennedy at common-lisp.net Thu Jul 12 07:20:23 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Thu, 12 Jul 2007 03:20:23 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070712072023.81AAE4B025@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv17447 Modified Files: specials.lisp Log Message: *lispy-pathname* should be the parent of where lispy is actually loaded from. --- /project/lispy/cvsroot/lispy/specials.lisp 2007/07/10 05:00:32 1.2 +++ /project/lispy/cvsroot/lispy/specials.lisp 2007/07/12 07:20:23 1.3 @@ -3,8 +3,8 @@ (defvar *lispy-map-url* (puri:parse-uri "http://common-lisp.net/project/lispy/repository/map.lisp-expr")) (defvar *lispy-pathname* - (make-pathname :name nil :type nil :version nil - :defaults (parse-namestring *load-truename*))) + (let ((path (make-pathname :name nil :type nil :version nil :defaults (parse-namestring *load-truename*)))) + (make-pathname :directory (butlast (pathname-directory path)) :defaults path))) (defvar *lispy-installation-pathname* (merge-pathnames #p"installation.lisp-expr" *lispy-pathname*)) From mkennedy at common-lisp.net Fri Jul 13 04:22:43 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Fri, 13 Jul 2007 00:22:43 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070713042243.B639C30A0@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv11818 Modified Files: lispy.lisp Log Message: Use format to print asdf-config.lisp. --- /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/10 05:00:32 1.2 +++ /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/13 04:22:43 1.3 @@ -165,10 +165,17 @@ (push path paths)))) *lispy-installation*) - (print `(let ((root (make-pathname :directory (pathname-directory *load-truename*)))) - (dolist (path ',paths) - (pushnew (merge-pathnames path root) asdf:*central-registry* :test 'equal))) - stream)))) + #+nil (print `(let ((root (make-pathname :directory (pathname-directory *load-truename*)))) + (dolist (path ',paths) + (pushnew (merge-pathnames path root) asdf:*central-registry* :test 'equal))) + stream) + (format stream +"(let ((root (make-pathname :directory (pathname-directory *load-truename*)))) + (dolist (path '(~{~S~})) + (pushnew (merge-pathnames path root) + asdf:*central-registry* + :test 'equal)))" + paths)))) (defgeneric fetch (module)) From mkennedy at common-lisp.net Fri Jul 13 04:23:17 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Fri, 13 Jul 2007 00:23:17 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070713042317.36A5D3144@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv11924 Added Files: .cvsignore Log Message: Ignore FASLs. --- /project/lispy/cvsroot/lispy/.cvsignore 2007/07/13 04:23:17 NONE +++ /project/lispy/cvsroot/lispy/.cvsignore 2007/07/13 04:23:17 1.1 *.fasl *.lib *.fas *.x86f From mkennedy at common-lisp.net Fri Jul 13 14:46:46 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Fri, 13 Jul 2007 10:46:46 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070713144646.2B5F91600F@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv1401 Modified Files: lispy.lisp Log Message: Add upgradable-p to determine if an installed package has a higher version in the map. --- /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/13 04:22:43 1.3 +++ /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/13 14:46:46 1.4 @@ -265,6 +265,9 @@ (remhash (name install) *lispy-installation*) (write-installation)) +(defun list-map () (hash-to-list *lispy-map*)) +(defun list-installation () (hash-to-list *lispy-installation*)) + (defun initialize () (setf *lispy-installation* (make-hash-table :test 'eq) *lispy-map* (make-hash-table :test 'eq)) @@ -275,6 +278,13 @@ (read-asdf-config) (values)) +(defgeneric upgradable-p (install module)) + +(defmethod upgradable-p ((install install) (module module)) + (let ((latest-version (latest-version module))) + (> (our-version latest-version) + (our-version install)))) + ;; (initialize) ;; (install (module-by-name 'drakma)) ;; (install (module-by-name 'cl-plus)) From mkennedy at common-lisp.net Fri Jul 13 14:48:15 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Fri, 13 Jul 2007 10:48:15 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070713144815.936622E1C8@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv1534 Modified Files: packages.lisp Log Message: Expose more of the API --- /project/lispy/cvsroot/lispy/packages.lisp 2007/07/09 05:11:14 1.1.1.1 +++ /project/lispy/cvsroot/lispy/packages.lisp 2007/07/13 14:48:15 1.2 @@ -11,4 +11,28 @@ #:install #:uninstall #:module-by-name - #:install-by-name)) + #:install-by-name + #:list-map + #:list-installation + + #:name + #:homepage + #:description + #:versions + #:latest-version + + #:our-version + #:version + #:source + #:md5sum + #:root + #:asdf-paths + #:dependencies + + #:read-asdf-config + #:write-asdf-config + #:read-installation + #:write-installation + #:read-map + + #:upgradable-p)) From mkennedy at common-lisp.net Fri Jul 13 14:48:30 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Fri, 13 Jul 2007 10:48:30 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070713144830.C5D002E1C8@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv1565 Modified Files: utils.lisp Log Message: Hash table to list. --- /project/lispy/cvsroot/lispy/utils.lisp 2007/07/12 05:56:51 1.2 +++ /project/lispy/cvsroot/lispy/utils.lisp 2007/07/13 14:48:30 1.3 @@ -43,3 +43,11 @@ (get-universal-time) (string-upcase name) (apply #'format nil (cons control-string format-arguments))))) + +(defun hash-to-list (hash) + (let ((result '())) + (maphash #'(lambda (k v) + (declare (ignore k)) + (push v result)) + hash) + result)) \ No newline at end of file From mkennedy at common-lisp.net Sat Jul 14 03:08:28 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Fri, 13 Jul 2007 23:08:28 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070714030828.1A5B65D006@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv29275 Modified Files: lispy.lisp Log Message: Added list-upgrades. --- /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/13 14:46:46 1.4 +++ /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/14 03:08:27 1.5 @@ -285,12 +285,14 @@ (> (our-version latest-version) (our-version install)))) -;; (initialize) -;; (install (module-by-name 'drakma)) -;; (install (module-by-name 'cl-plus)) -;; (uninstall (install-by-name 'chunga)) - - +(defmethod list-upgrades () + (let ((result '())) + (dolist (i (list-installation)) + (let ((module (module-by-name (name i)))) + (when (and module + (upgradable-p i module)) + (push module result)))) + result)) ;;; Lispy bootstrap code (remove installation.lisp-expr, distfiles and ;;; all source directories) From mkennedy at common-lisp.net Sat Jul 14 05:11:55 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Sat, 14 Jul 2007 01:11:55 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070714051155.44B3232031@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv512 Modified Files: lispy.lisp packages.lisp Log Message: Add upgrade functionality. Use keyword symbols for install/module names. --- /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/14 03:08:27 1.5 +++ /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/14 05:11:54 1.6 @@ -171,7 +171,7 @@ stream) (format stream "(let ((root (make-pathname :directory (pathname-directory *load-truename*)))) - (dolist (path '(~{~S~})) + (dolist (path '(~{~S ~})) (pushnew (merge-pathnames path root) asdf:*central-registry* :test 'equal)))" @@ -263,7 +263,8 @@ (defmethod uninstall ((install install)) (cl-fad:delete-directory-and-files (merge-pathnames (root install) *lispy-pathname*) :if-does-not-exist :ignore) (remhash (name install) *lispy-installation*) - (write-installation)) + (write-installation) + (values)) (defun list-map () (hash-to-list *lispy-map*)) (defun list-installation () (hash-to-list *lispy-installation*)) @@ -285,7 +286,7 @@ (> (our-version latest-version) (our-version install)))) -(defmethod list-upgrades () +(defun list-upgrades () (let ((result '())) (dolist (i (list-installation)) (let ((module (module-by-name (name i)))) @@ -294,10 +295,34 @@ (push module result)))) result)) +(defgeneric upgrade (install)) + +(defmethod upgrade ((install install)) + (let ((module (module-by-name (name install)))) + (if (upgradable-p install module) + (let ((latest-version (latest-version module))) + (log-message "upgrade" "Upgrading ~A from ~A to ~A" + (name install) + (version install) + (version latest-version)) + + (if (equal install (root latest-version)) + (progn ;less ideal + (uninstall install) + (install latest-version)) + (progn ;ideal + (install latest-version) + (uninstall install)))) + (log-message "upgrade" "~A ~A is already the latest version." + (name install) + (version install))))) + +(defun upgrade-all () + (dolist (install (list-upgrades)) + (upgrade install))) + ;;; Lispy bootstrap code (remove installation.lisp-expr, distfiles and ;;; all source directories) #+nil -(dolist (name '(drakma puri gzip-stream archive ironclad cl-fad asdf lispy)) +(dolist (name '(:drakma :puri :gzip-stream :archive :ironclad :cl-fad :asdf :lispy :cl+ssl :flexi-streams :trivial-gray-streams :chunga :salza :cffi :split-sequence :cl-base64)) (install (module-by-name name))) -#+nil -(initialize) --- /project/lispy/cvsroot/lispy/packages.lisp 2007/07/13 14:48:15 1.2 +++ /project/lispy/cvsroot/lispy/packages.lisp 2007/07/14 05:11:54 1.3 @@ -14,13 +14,11 @@ #:install-by-name #:list-map #:list-installation - #:name #:homepage #:description #:versions #:latest-version - #:our-version #:version #:source @@ -28,11 +26,12 @@ #:root #:asdf-paths #:dependencies - #:read-asdf-config #:write-asdf-config #:read-installation #:write-installation #:read-map - - #:upgradable-p)) + #:upgradable-p + #:list-upgrades + #:upgrade + #:upgrade-all)) From mkennedy at common-lisp.net Sat Jul 14 05:12:19 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Sat, 14 Jul 2007 01:12:19 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070714051219.BEE3132036@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv556 Modified Files: README Log Message: Correct typo. --- /project/lispy/cvsroot/lispy/README 2007/07/09 05:11:14 1.1.1.1 +++ /project/lispy/cvsroot/lispy/README 2007/07/14 05:12:19 1.2 @@ -2,5 +2,5 @@ Lispy is licensed under the "Lisp GNU Lesser General Public License" sometimes refered to as the LLGPL. This is the GNU Lesser General Public License 2.1 with the preamble from Franz Incorporated -(http://opensource.franz.com/preamble.html) both are which are +(http://opensource.franz.com/preamble.html) both of which are distributed in LICENSE. From mkennedy at common-lisp.net Sat Jul 21 07:08:56 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Sat, 21 Jul 2007 03:08:56 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070721070856.1B40016037@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv378 Modified Files: lispy.lisp Log Message: Fix upgrade-all --- /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/14 05:11:54 1.6 +++ /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/21 07:08:55 1.7 @@ -292,7 +292,7 @@ (let ((module (module-by-name (name i)))) (when (and module (upgradable-p i module)) - (push module result)))) + (push (list i (latest-version module)) result)))) result)) (defgeneric upgrade (install)) @@ -318,8 +318,11 @@ (version install))))) (defun upgrade-all () - (dolist (install (list-upgrades)) - (upgrade install))) + (dolist (upgrade (list-upgrades)) + (destructuring-bind (install version) + upgrade + (declare (ignore version)) + (upgrade install)))) ;;; Lispy bootstrap code (remove installation.lisp-expr, distfiles and ;;; all source directories) From mkennedy at common-lisp.net Sun Jul 22 02:59:50 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Sat, 21 Jul 2007 22:59:50 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070722025950.AD7325314E@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv3064 Modified Files: lispy.asd lispy.lisp packages.lisp specials.lisp Log Message: Added distributed map support. Load a configuration after loading the system but before initialization. --- /project/lispy/cvsroot/lispy/lispy.asd 2007/07/12 05:56:04 1.3 +++ /project/lispy/cvsroot/lispy/lispy.asd 2007/07/22 02:59:50 1.4 @@ -18,4 +18,8 @@ #:cl-fad)) (defmethod perform :after ((o load-op) (c (eql (find-system 'lispy)))) + (let ((lispy-config (merge-pathnames #p".lispy.lisp"(user-homedir-pathname)))) + (if (probe-file lispy-config) + (load lispy-config) + (warn "Lispy configuration not found at ~A" lispy-config))) (funcall (intern "INITIALIZE" (find-package "LISPY")))) --- /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/21 07:08:55 1.7 +++ /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/22 02:59:50 1.8 @@ -5,7 +5,8 @@ ((name :initarg :name :reader name) (homepage :initarg :homepage :reader homepage) (description :initarg :description :reader description) - (versions :initarg :versions :reader versions))) + (versions :initarg :versions :reader versions) + (map-url :initarg :map-url :reader map-url))) (defgeneric latest-version (module)) @@ -35,6 +36,7 @@ (defclass version () ((name :initarg :name :reader name) + (map-url :initarg :map-url :reader map-url) (our-version :initarg :our-version :reader our-version) (version :initarg :version :reader version) (source :initarg :source :reader source) @@ -56,20 +58,27 @@ (defun module-by-name (name) (gethash name *lispy-map*)) -(defun read-map (&optional (map-url *lispy-map-url*)) - (log-message "read-map" "Reading ~A" (uri-to-string *lispy-map-url*)) +(defun read-map (map-url) + (log-message "read-map" "Reading ~A" (uri-to-string map-url)) (multiple-value-bind (stream status-code headers uri http-stream must-close) (drakma:http-request map-url :want-stream t) (declare (ignore status-code headers uri http-stream must-close)) (unwind-protect - (dolist (module (mapcar #'parse-module (read stream))) + (dolist (module (mapcar #'(lambda (m) + (parse-module m map-url)) + (read stream))) (setf (gethash (name module) *lispy-map*) module)) - (close stream))) - (log-message "read-map" "Map contains ~A entr~:@p" (hash-table-count *lispy-map*)) + (close stream)))) + +(defun read-maps (&optional (map-urls *lispy-map-urls*)) + (dolist (map-url map-urls) + (read-map map-url)) + (log-message "read-maps" "Map contains ~A entr~:@p" + (hash-table-count *lispy-map*)) *lispy-map*) -(defun parse-module (module) +(defun parse-module (module map-url) (destructuring-bind (&key name homepage description versions) module (make-instance 'module @@ -77,10 +86,11 @@ :homepage homepage :description description :versions (mapcar #'(lambda (v) - (parse-version name v)) - versions)))) + (parse-version name v map-url)) + versions) + :map-url map-url))) -(defun parse-version (name version) +(defun parse-version (name version map-url) (destructuring-bind (&key our-version version source md5sum root asdf-paths dependencies) version (make-instance 'version @@ -91,7 +101,8 @@ :md5sum md5sum :root root :asdf-paths (or asdf-paths (list root)) - :dependencies dependencies))) + :dependencies dependencies + :map-url map-url))) (defclass install () ((name :initarg :name :reader name) @@ -184,7 +195,7 @@ (fetch (latest-version module))) (defmethod fetch ((version version)) - (log-message "fetch" "Fetching ~A" (uri-to-string (make-fetch-url (source version)))) + (log-message "fetch" "Fetching ~A" (uri-to-string (make-fetch-url (source version) (map-url version)))) (ensure-directories-exist *lispy-distfiles-pathname*) (let ((pathname (merge-pathnames (source version) *lispy-distfiles-pathname*))) (if (and (probe-file pathname ) @@ -194,7 +205,7 @@ (version version)) (progn (multiple-value-bind (stream status-code headers uri http-stream must-close) - (drakma:http-request (make-fetch-url (source version)) + (drakma:http-request (make-fetch-url (source version) (map-url version)) :force-binary t :want-stream t) (declare (ignore status-code headers uri http-stream must-close)) @@ -209,10 +220,10 @@ (unless (compare-to-md5sum pathname (md5sum version)) (error "MD5 checksum for ~S failed" (source version))))))) -(defun make-fetch-url (source) - (let ((parsed-path (append (butlast (puri:uri-parsed-path *lispy-map-url*)) +(defun make-fetch-url (source map-url) + (let ((parsed-path (append (butlast (puri:uri-parsed-path map-url)) (list "distfiles" source)))) - (let ((result (puri:copy-uri *lispy-map-url*))) + (let ((result (puri:copy-uri map-url))) (setf (puri:uri-parsed-path result) parsed-path) result))) @@ -273,7 +284,7 @@ (setf *lispy-installation* (make-hash-table :test 'eq) *lispy-map* (make-hash-table :test 'eq)) (log-message "initialize" "Initializing Lispy system on ~A ~A" (lisp-implementation-type) (lisp-implementation-version)) - (read-map) + (read-maps) (read-installation) (write-asdf-config) (read-asdf-config) --- /project/lispy/cvsroot/lispy/packages.lisp 2007/07/14 05:11:54 1.3 +++ /project/lispy/cvsroot/lispy/packages.lisp 2007/07/22 02:59:50 1.4 @@ -1,7 +1,7 @@ (defpackage #:lispy (:use #:common-lisp) - (:export #:*lispy-map-url* + (:export #:*lispy-map-urls* #:*lispy-pathname* #:*lispy-installation-pathname* #:*lispy-asdf-config-pathname* --- /project/lispy/cvsroot/lispy/specials.lisp 2007/07/12 07:20:23 1.3 +++ /project/lispy/cvsroot/lispy/specials.lisp 2007/07/22 02:59:50 1.4 @@ -1,6 +1,7 @@ (in-package #:lispy) -(defvar *lispy-map-url* (puri:parse-uri "http://common-lisp.net/project/lispy/repository/map.lisp-expr")) +(defvar *lispy-map-urls* + (list (puri:parse-uri "http://common-lisp.net/project/lispy/repository/map.lisp-expr"))) (defvar *lispy-pathname* (let ((path (make-pathname :name nil :type nil :version nil :defaults (parse-namestring *load-truename*)))) From mkennedy at common-lisp.net Mon Jul 23 14:25:58 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Mon, 23 Jul 2007 10:25:58 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070723142558.325B22D077@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv13378 Modified Files: lispy.asd lispy.lisp packages.lisp specials.lisp utils.lisp Log Message: Add default map. --- /project/lispy/cvsroot/lispy/lispy.asd 2007/07/22 02:59:50 1.4 +++ /project/lispy/cvsroot/lispy/lispy.asd 2007/07/23 14:25:57 1.5 @@ -7,9 +7,10 @@ (defsystem #:lispy :components ((:file "packages") - (:file "specials" :depends-on ("packages")) - (:file "utils" :depends-on ("specials")) - (:file "lispy" :depends-on ("utils"))) + (:file "utils") + (:file "specials") + (:file "lispy")) + :serial t :depends-on (#:drakma #:puri #:gzip-stream --- /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/22 02:59:50 1.8 +++ /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/23 14:25:58 1.9 @@ -1,6 +1,13 @@ (in-package #:lispy) +(defun log-message (name control-string &rest format-arguments) + (when *lispy-log-stream* + (format *lispy-log-stream* "~&~A ~A: ~A~%" + (get-universal-time) + (string-upcase name) + (apply #'format nil (cons control-string format-arguments))))) + (defclass module () ((name :initarg :name :reader name) (homepage :initarg :homepage :reader homepage) --- /project/lispy/cvsroot/lispy/packages.lisp 2007/07/22 02:59:50 1.4 +++ /project/lispy/cvsroot/lispy/packages.lisp 2007/07/23 14:25:58 1.5 @@ -7,6 +7,7 @@ #:*lispy-asdf-config-pathname* #:*lispy-distfiles-pathname* #:*lispy-log-stream* + #:+lispy-default-map-url+ #:initialize #:install #:uninstall --- /project/lispy/cvsroot/lispy/specials.lisp 2007/07/22 02:59:50 1.4 +++ /project/lispy/cvsroot/lispy/specials.lisp 2007/07/23 14:25:58 1.5 @@ -1,7 +1,9 @@ (in-package #:lispy) -(defvar *lispy-map-urls* - (list (puri:parse-uri "http://common-lisp.net/project/lispy/repository/map.lisp-expr"))) +(define-constant +lispy-default-map-url+ + (puri:parse-uri "http://common-lisp.net/project/lispy/repository/map.lisp-expr")) + +(defvar *lispy-map-urls* (list +lispy-default-map-url+)) (defvar *lispy-pathname* (let ((path (make-pathname :name nil :type nil :version nil :defaults (parse-namestring *load-truename*)))) --- /project/lispy/cvsroot/lispy/utils.lisp 2007/07/13 14:48:30 1.3 +++ /project/lispy/cvsroot/lispy/utils.lisp 2007/07/23 14:25:58 1.4 @@ -37,17 +37,14 @@ (with-output-to-string (stream) (puri:render-uri uri stream))) -(defun log-message (name control-string &rest format-arguments) - (when *lispy-log-stream* - (format *lispy-log-stream* "~&~A ~A: ~A~%" - (get-universal-time) - (string-upcase name) - (apply #'format nil (cons control-string format-arguments))))) - (defun hash-to-list (hash) (let ((result '())) (maphash #'(lambda (k v) (declare (ignore k)) (push v result)) hash) - result)) \ No newline at end of file + result)) + +(defmacro define-constant (name value &optional doc) + `(defconstant ,name (if (boundp ',name) (symbol-value ',name) ,value) + ,@(when doc (list doc)))) From mkennedy at common-lisp.net Tue Jul 24 04:59:00 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Tue, 24 Jul 2007 00:59:00 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070724045900.71ADD4E022@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv16226 Modified Files: .cvsignore lispy.lisp Log Message: Use printer for installation.lisp-expr and asdf-config.lisp. Bind *print-readably* t when printing. --- /project/lispy/cvsroot/lispy/.cvsignore 2007/07/13 04:23:17 1.1 +++ /project/lispy/cvsroot/lispy/.cvsignore 2007/07/24 04:59:00 1.2 @@ -2,3 +2,4 @@ *.lib *.fas *.x86f +*.ufasl --- /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/23 14:25:58 1.9 +++ /project/lispy/cvsroot/lispy/lispy.lisp 2007/07/24 04:59:00 1.10 @@ -141,17 +141,18 @@ :direction :output :if-does-not-exist :create :if-exists :supersede) - (print (let ((installation '())) - (maphash #'(lambda (name install) - (push `(:name ,name - :our-version ,(our-version install) - :version ,(version install) - :root ,(root install) - :asdf-paths ,(asdf-paths install)) - installation)) - *lispy-installation*) - installation) - stream))) + (let ((*print-readably* t)) + (print (let ((installation '())) + (maphash #'(lambda (name install) + (push `(:name ,name + :our-version ,(our-version install) + :version ,(version install) + :root ,(root install) + :asdf-paths ,(asdf-paths install)) + installation)) + *lispy-installation*) + installation) + stream)))) (defun parse-install (install) (destructuring-bind (&key name our-version version root asdf-paths) @@ -183,17 +184,11 @@ (push path paths)))) *lispy-installation*) - #+nil (print `(let ((root (make-pathname :directory (pathname-directory *load-truename*)))) - (dolist (path ',paths) - (pushnew (merge-pathnames path root) asdf:*central-registry* :test 'equal))) - stream) - (format stream -"(let ((root (make-pathname :directory (pathname-directory *load-truename*)))) - (dolist (path '(~{~S ~})) - (pushnew (merge-pathnames path root) - asdf:*central-registry* - :test 'equal)))" - paths)))) + (let ((*print-readably* t)) + (print `(let ((cl-user::root (make-pathname :directory (pathname-directory *load-truename*)))) + (dolist (cl-user::path ',paths) + (pushnew (merge-pathnames cl-user::path cl-user::root) asdf:*central-registry* :test 'equal))) + stream))))) (defgeneric fetch (module)) From mkennedy at common-lisp.net Sun Jul 29 19:55:37 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Sun, 29 Jul 2007 15:55:37 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070729195537.6303A21054@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv22684 Added Files: bootstrap.sh Log Message: Added automated bootstrap script. --- /project/lispy/cvsroot/lispy/bootstrap.sh 2007/07/29 19:55:37 NONE +++ /project/lispy/cvsroot/lispy/bootstrap.sh 2007/07/29 19:55:37 1.1 #!/bin/bash set -x SOURCES='http://common-lisp.net/project/lispy/repository/distfiles' # (mapcar #'(lambda (module) # (let ((version (lispy:latest-version module))) # (write-line (lispy:source version)))) # (sort (remove-duplicates(lispy::dependency-list (lispy:module-by-name :lispy))) # #'string< # :key #'lispy:name)) DEPENDENCIES=' archive_0.6.0-lispy.tar.gz cffi-070620-lispy.tar.gz chunga-0.3.0-lispy.tar.gz cl+ssl-2007-07-07-lispy.tar.gz cl-base64-3.3.2-lispy.tar.gz cl-fad-0.6.0-lispy.tar.gz drakma-0.9.1-lispy.tar.gz flexi-streams-0.11.2-lispy.tar.gz gzip-stream_0.1-lispy.tar.gz ironclad_0.22-lispy.tar.gz lispy-0.2.tar.gz puri-1.5.1-lispy.tar.gz salza-0.7.4-lispy.tar.gz split-sequence-2002-04-10-lispy.tar.gz trivial-gray-streams-2006-09-16-lispy.tar.gz usocket-0.3.3-lispy.tar.gz' TMP=`mktemp -d -t bootstrap.sh.XXXXXX` trap "rm -rf $TMP* 2>/dev/null" EXIT mkdir -p $TMP/lispy-all/distfiles for d in $DEPENDENCIES; do wget -q -P $TMP/lispy-all/distfiles -nd "$SOURCES/$d" tar xfz "$TMP/lispy-all/distfiles/$d" -C $TMP/lispy-all done cat >$TMP/lispy-all/asdf-config.lisp <>$TMP/lispy-all/asdf-config.lisp <>$TMP/lispy-all/asdf-config.lisp <>$TMP/load.lisp < Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv26579 Modified Files: bootstrap.sh Log Message: Write installation.lisp-expr during bootstrap. --- /project/lispy/cvsroot/lispy/bootstrap.sh 2007/07/29 19:55:37 1.1 +++ /project/lispy/cvsroot/lispy/bootstrap.sh 2007/07/29 20:09:03 1.2 @@ -22,7 +22,7 @@ flexi-streams-0.11.2-lispy.tar.gz gzip-stream_0.1-lispy.tar.gz ironclad_0.22-lispy.tar.gz -lispy-0.2.tar.gz +lispy-0.3.tar.gz puri-1.5.1-lispy.tar.gz salza-0.7.4-lispy.tar.gz split-sequence-2002-04-10-lispy.tar.gz @@ -60,6 +60,7 @@ (require :asdf) (load "$TMP/lispy-all/asdf-config.lisp") (asdf:oos 'asdf:load-op :lispy) +(lispy:install (lispy:module-by-name :lispy)) (quit) EOF From mkennedy at common-lisp.net Sun Jul 29 21:46:56 2007 From: mkennedy at common-lisp.net (mkennedy) Date: Sun, 29 Jul 2007 17:46:56 -0400 (EDT) Subject: [lispy-cvs] CVS lispy Message-ID: <20070729214656.9E4431603C@common-lisp.net> Update of /project/lispy/cvsroot/lispy In directory clnet:/tmp/cvs-serv21305 Modified Files: bootstrap.sh Log Message: Add ASDF to the dependencies and copy it into the root directory for ease of use. --- /project/lispy/cvsroot/lispy/bootstrap.sh 2007/07/29 20:09:03 1.2 +++ /project/lispy/cvsroot/lispy/bootstrap.sh 2007/07/29 21:46:56 1.3 @@ -5,14 +5,16 @@ SOURCES='http://common-lisp.net/project/lispy/repository/distfiles' # (mapcar #'(lambda (module) -# (let ((version (lispy:latest-version module))) -# (write-line (lispy:source version)))) -# (sort (remove-duplicates(lispy::dependency-list (lispy:module-by-name :lispy))) -# #'string< -# :key #'lispy:name)) +# (let ((version (lispy:latest-version module))) +# (write-line (lispy:source version)))) +# (sort (remove-duplicates (cons (lispy:module-by-name :asdf) +# (lispy::dependency-list (lispy:module-by-name :lispy)))) +# #'string< +# :key #'lispy:name)) DEPENDENCIES=' archive_0.6.0-lispy.tar.gz +asdf-1.108-lispy.tar.gz cffi-070620-lispy.tar.gz chunga-0.3.0-lispy.tar.gz cl+ssl-2007-07-07-lispy.tar.gz @@ -56,6 +58,7 @@ EOF cat $TMP/lispy-all/asdf-config.lisp +cp $TMP/lispy-all/asdf-*/asdf.lisp $TMP/lispy-all/ cat >>$TMP/load.lisp <