Re: Sharing ASDF-INSTALLed packages among Lisp implementations

Gary King <[email protected]>
Newsgroups gmane.lisp.cclan.general
Message-ID <[email protected]>
Hi Paolo,

I'm doing this now with SBCL, Allegro (trial version) and OpenMCL. My  
start up files include the following bit of code (SBCL is a little  
different because it comes with some ASDF packages of it's own):

> (setf (logical-pathname-translations "user-home")
>       `(("**;*.*" ,(namestring
>                     (make-pathname
>                      :directory
>                      (append (pathname-directory
>                               (user-homedir-pathname))
>                              (list :wild-inferiors)))))))
>
> (require 'asdf)
>
> ;; force SBCL things to stay in SBCL
> (defvar asdf::*system-configuration-paths*
>   '(("/usr/local/lib/sbcl/" nil))
>   "The *system-configuration-paths* variable specifies mappings  
> from source to target.")
>
> (defun add-to-central-registry (foo)
>   (push foo (symbol-value (intern "*CENTRAL-REGISTRY*" "ASDF"))))
>
> (defun asdf ()
>   (add-to-central-registry "user-home:darcs;asdf-systems;")
>   (asdf:oos 'asdf:load-op 'asdf-binary-locations)
>
>   ;; to bootstrap ASDF-Install
>   (add-to-central-registry "/usr/local/asdf-install/")
>   (asdf:oos 'asdf:load-op 'asdf-install)
>
>   ;; for SC stuff
>   (add-to-central-registry "/usr/local/asdf-install/site-systems/")
>   (add-to-central-registry "user-home:.asdf-install-dir;site- 
> systems;")
>   ;; for SC stuff
>   (add-to-central-registry "/repository/darcs/asdf-systems/")
>   (add-to-central-registry "user-home:darcs;asdf-systems;")
>   )
>

The ~/darcs/asdf-systems and /repository/darcs/asdf-systems folders  
contain system definitions for the systems I develop and the ones I  
obtain not using ASDF-Install. I use this script:

> #!/bin/sh
>
> ## This works but it noisy about it
> #find .. -name "*.asd" -type f -newer last-run -print -exec sh -c  
> 'kill $PPID' \;
> find .. -name "*.asd" -type f -newer last-run -print | head -1 |  
> grep -iq ".."
> if [ $? -eq 0 ]
> then
> 	# echo "good " $?
> 	# A match was found so we need to update
>     rm *.asd
>     find .. -name "*.asd" -and -not -path "*/_darcs/*" -exec ln -s  
> {} \; -print
>     exit 0
> else
>     # echo "bad " $?
>     # No matches were found so there is nothing to do
>     exit -1
> fi

Note that Bill Clementson has done this in what is probably a more  
clever and general way (I haven't had the time to look closely yet  
(http://bc.tech.coop/blog/051004.html).

As for ASDF-Install, it does check that a package is available before  
downloading it. It does not, however, do any "up-to-date" checks. I'm  
intending to add this feature (probably as an extension) sometime in  
January.

HTH,

On Dec 27, 2005, at 7:31 AM, Paolo Amoroso wrote:

> I have CMUCL and SBCL on my Linux box, and I would like to use
> ASDF-INSTALL with both.  For packages that run on both Lisps, what is
> the best setting for ASDF-INSTALL:*LOCATIONS*?  Is it appropriate to
> have the same locations for CMUCL and SBCL?  Can ASDF-INSTALL share
> the same sources for both Lisps?  Does it check that a package is
> already installed before downloading it?

-- 
Gary Warren King
metabang.com
http://www.metabang.com/
smime.p7s (application/pkcs7-signature, 2.3 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.