[asdf-install-devel] Possible patch to installer.lisp for LispWorks 5.0?
Gary King
gwking at metabang.com
Mon Nov 20 16:28:02 UTC 2006
Hi Chris,
I like your patch but I've changed it some in the hopes of being
slightly more general.
Instead of adding *bin-path*, I'm adding *shell-path* and using it in
find-shell-command:
(defvar *shell-path* '((:absolute "usr" "bin"))
"A list of places to look for shell commands.")
(defun find-shell-command (command)
(loop for directory in *shell-path* do
(let ((target (make-pathname :name command :type nil
:directory directory)))
(when (probe-file target)
(return-from find-shell-command target))))
(values nil))
Then tar-command becomes:
(defun tar-command ()
#-(or :win32 :mswindows)
(find-shell-command *gnu-tar-program*)
#+(or :win32 :mswindows)
*cygwin-bash-program*)
and, hopefully, I can use find-shell-command elsewhere too.
On Nov 6, 2006, at 5:03 PM, Christopher Brown wrote:
> Forgive me, as I'm new to both the list and to Lisp.
> I've been using sbcl, openmcl and now purchased LispWorks 5.0 on
> the Mac.
>
> The most recent asdf-install seems to work with openmcl, but
> LispWorks gives an error about ' "/usr/bin", top-level directory
> cannot contain "/"' from the call to make-pathname in tar-command.
> I messed about and came up with the following patches that seem to
> work in both LispWorks and openmcl. The first gets the pathname-
> directory if not nil and the second simply builds an absolute
> directory from "usr" and "bin" in a gratuitous *bin-path* variable.
>
> Please let me know if I'm off the track here.
>
> Thanks,
> Chris
>
> --- ./installer.lisp 2006-11-04 17:39:51.000000000 -0700
> +++ /Users/cbrown/.asdf-install-dir/site/asdf-install/
> installer.lisp 2006-11-06 14:52: 31.000000000 -0700
> @@ -285,11 +285,11 @@
> (flet ((find-bin (directory)
> (let ((bin (make-pathname :name tar-command
> :type nil
> - :directory directory)))
> + :directory (and directory
> (pathname-directory (parse-namestring directory))))))
> (when (probe-file bin)
> (namestring bin)))))
> (or (find-bin nil)
> - (find-bin "/usr/bin/"))))
> + (find-bin *bin-path*))))
> #+(or :win32 :mswindows)
> *cygwin-bash-program*)
>
> --- ./variables.lisp 2006-11-04 17:39:51.000000000 -0700
> +++ /Users/cbrown/.asdf-install-dir/site/asdf-install/
> variables.lisp 2006-11-06 14:47: 49.000000000 -0700
> @@ -75,6 +75,9 @@
> #+digitool ,*home-volume-name*
> "usr" "local" "asdf-install")))))
>
> +(defvar *bin-path*
> + (make-pathname :directory '(:absolute "usr" "bin")))
> +
> (defvar *private-asdf-install-dirs*
> #+:sbcl
> (merge-pathnames (make-pathname :directory '(:relative ".sbcl"))
>
> _______________________________________________
> asdf-install-devel mailing list
> asdf-install-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-install-devel
--
Gary Warren King, metabang.com
Cell: (413) 885 9127
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/asdf-install-devel/attachments/20061120/e78a1b11/attachment.html>
More information about the asdf-install-devel
mailing list