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))