I thought I had understood your question, but now I see that I did not. Let me see if I have this right:
1. There are pre-packaged CL systems (sources) like `cl-alexandria` 2. There are additionally binary systems corresponding to the pre-packaged systems, like `cl-alexandria-sbcl` Are you trying to do the following: - If the prepackaged CL source systems and their binaries are present, then ASDF should be configured so that the output-translations point ASDF to the packaged binaries. - If a prepackaged CL source system is present and the binary package *is not* present, then ASDF should be configured so that the binaries from building the prepackaged systems go into the *user's* cache directory somewhere, because the user will typically not be able to write to the location of the packaged binaries ? If that is so, maybe when a package like `cl-alexandria` is installed, it should write an entry to the output translations to write fasls to the user's directory, and then when a package like `cl-alexandria-sbcl` is written, the output translations should be updated to delete the original entry and add a new entry that points to the packaged fasl directory. Note that I think this could be done by writing to files in `/etc` or some similar location. Honestly, I don't know what to do if the binary package has some but not all fasls. That would be a mess. > Hello Robert, > > Thank you for your response. > > We loop over the locations where compiled code is stored to build the output > translations, as shown in the code below. > > (defvar *freebsd-output-translations* ()) > (pushnew :inherit-configuration *freebsd-output-translations*) > (dolist (path (directory "/usr/local/lib/common-lisp/*/")) > (unless (and (pathnamep path) > (search *system-registry* > (namestring path) > :start1 0 :end1 (length *system-registry*))) > (let ((source (make-pathname > :directory (append (pathname-directory path) > (list :wild-inferiors)))) > (target (make-pathname > :directory (append (pathname-directory path) > (list (lisp-specific-fasl-subdir) > :wild-inferiors))))) > (pushnew (list source target) *freebsd-output-translations*)))) > (asdf:initialize-output-translations (cons :output-translations > *freebsd-output-translations*)) > > The files in our CL OS packages are stored under > /usr/local/lib/common-lisp/<project>/. The FASL packages put compiled code > in directories unique to each lisp implementation such as > /usr/local/lib/common-lib/<project>/sbclfasl, > /usr/local/lib/common-lisp/<package_name>/cclfasl/, and so on. > > Before the call to asdf:initialize-output-translations, > *freebsd-output-translations* looks correct (if I'm understanding the DSL > format): > > (:OUTPUT-TRANSLATIONS > (#P"/usr/local/lib/common-lisp/gpgme/**/" > #P"/usr/local/lib/common-lisp/gpgme/sbclfasl/**/") > (#P"/usr/local/lib/common-lisp/asdf/**/" > #P"/usr/local/lib/common-lisp/asdf/sbclfasl/**/") > (#P"/usr/local/lib/common-lisp/alexandria/**/" > #P"/usr/local/lib/common-lisp/alexandria/sbclfasl/**/") > :INHERIT-CONFIGURATION) > > The part that I'm still missing is how to add locations to the exceptions to > output translations. > > Kind regards, > Joe > > P.S. After the call to asdf:initialize-output-translations, dumping > asdf::*output-translations* gives: > > (((#P"/usr/local/lib/common-lisp/gpgme/sbclfasl/**/" T) > (#P"/usr/local/lib/common-lisp/asdf/sbclfasl/**/" T) > (#P"/usr/local/lib/common-lisp/alexandria/sbclfasl/**/" T) > (#P"/usr/home/jrm/.cache/common-lisp/sbcl-2.4.10-bsd-x64-s/**/*.*" T) > (#P"/usr/local/lib/common-lisp/gpgme/**/" > #P"/usr/local/lib/common-lisp/gpgme/sbclfasl/**/") > (#P"/usr/local/lib/common-lisp/asdf/**/" > #P"/usr/local/lib/common-lisp/asdf/sbclfasl/**/") > (#P"/usr/local/lib/common-lisp/alexandria/**/" > #P"/usr/local/lib/common-lisp/alexandria/sbclfasl/**/") > (#P"/home/jrm/.cache/common-lisp/my-dir/**/*.*" T) > (#P"/usr/local/lib/sbcl/**/*.*" T) > (#P"/**/*.*" #P"/home/jrm/.cache/common-lisp/my-dir/**/*.*") > (T #P"/usr/home/jrm/.cache/common-lisp/sbcl-2.4.10-bsd-x64-s/**/*.*"))) Robert P. Goldman Research Fellow Smart Information Flow Technologies (d/b/a SIFT, LLC) 319 N. First Ave., Suite 400 Minneapolis, MN 55401 Google Voice: (612) 326-3934 Cell: (612) 384-3454 Email: rpgold...@sift.net
signature.asc
Description: OpenPGP digital signature