X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fasdf-install%2Finstaller.lisp;h=607b02dcb818bbeebb91c64a2639d810c39e4907;hb=3abdab003d4cdb02d7386dcd4bc8d9ac4dafb359;hp=639fcdce72a64fdbd1a4cefbfaacd0bcf619e90c;hpb=d4e910b9a2851d52117c4c7fd9f847e5b54414a0;p=sbcl.git diff --git a/contrib/asdf-install/installer.lisp b/contrib/asdf-install/installer.lisp index 639fcdc..607b02d 100644 --- a/contrib/asdf-install/installer.lisp +++ b/contrib/asdf-install/installer.lisp @@ -216,6 +216,7 @@ (return)))))) + (defun verify-gpg-signature/url (url file-name) (destructuring-bind (response headers stream) (url-connection (concatenate 'string url ".asc")) @@ -330,3 +331,18 @@ (prin1 *trusted-uids* out)))) (dolist (l *temporary-files*) (when (probe-file l) (delete-file l)))))) + +(defun uninstall (system &optional (prompt t)) + (let* ((asd (asdf:system-definition-pathname system)) + (system (asdf:find-system system)) + (dir (asdf::pathname-sans-name+type + (asdf::resolve-symlinks asd)))) + (when (or (not prompt) + (y-or-n-p + "Delete system ~A~%asd file: ~A~%sources: ~A~%Are you sure?" + system asd dir)) + (delete-file asd) + (asdf:run-shell-command "rm -r ~A" (namestring dir))))) + +;;; some day we will also do UPGRADE, but we need to sort out version +;;; numbering a bit better first