Bug#560781: [asdf-devel] Bug#560781: (require :package) no longer works for CLC-managed packages
Pascal J. Bourguignon
pjb at informatimago.com
Fri Jan 29 14:26:04 UTC 2010
On 2010/01/25, at 15:46 , Faré wrote:
> OK, the ASDF my repo now supports source-registry.conf.d as well as
> source-registry.conf. I'll commit it upstream by next week unless I
> get negative feedback, and hopefully after including some tests.
>
> Note that at least clisp seems confused when matching *.* or
> (make-pathname :type :wild :name :wild) by refusing to match names
> without a dot in them, which is unfortunate. So it's better to have a
> name in .conf or some such under that directory.
Or perhaps we could consider it conformant, and add the required
logical host translations for dotless files?
I use the following function to build my translations. Notice that
what I'd expect is in the "other" branch, but unfortunately, even the
_order_ matters for some implementations to correctly translate.
(defun make-translations (host logical-dir physical-dir &optional file-
type)
(mapcar
(lambda (item)
(destructuring-bind (logical-tail physical-tail) item
(list (apply (function make-pathname)
:host host
:directory `(:absolute , at logical-dir :wild-
inferiors)
logical-tail)
(format nil "~A**/~A" physical-dir physical-tail))))
#+clisp
(if file-type
`(((:name :wild :type ,file-type :version nil) ,(format nil
"*.~(~A~)" file-type)))
'(((:name :wild :type :wild :version nil) "*.*")
((:name :wild :type nil :version nil) "*")))
#+sbcl
(if file-type
`(((:name :wild :type ,file-type :version :wild) ,(format nil
"*.~(~A~)" file-type)))
'(((:name :wild :type :wild :version :wild) "*.*")))
#+allegro
(if file-type
`(((:name :wild :type ,file-type :version nil) ,(format nil
"*.~(~A~)" file-type)))
'(((:name :wild :type nil :version nil) "*")
((:name :wild :type :wild :version nil) "*.*")))
#-(OR CLISP sbcl)
(if file-type
`(((:name :wild :type ,file-type :version nil) ,(format nil
"*.~(~A~)" file-type))
((:name :wild :type ,file-type :version :wild) ,(format nil
"*.~(~A~)" file-type)))
'(((:name :wild :type nil :version nil) "*")
((:name :wild :type :wild :version nil) "*.*")
((:name :wild :type :wild :version :wild) "*.*")))))
;; Notice that clhs logical-pathname-translations says that:
;; "From-wildcard is a logical pathname whose host is host."
;; Therefore the host must already exist,
;; so we must first create it by setting its translations to NIL.
(setf (logical-pathname-translations "EXAMPLE") nil)
(setf (logical-pathname-translations "EXAMPLE")
(append
(make-translations "EXAMPLE" '("PGM") "/bin/example/" "BIN")
(make-translations "EXAMPLE" '("PGM") "/pgm/example/")
(make-translations "EXAMPLE" '() "/example/")))
-->
((#P"EXAMPLE:PGM;**;*.BIN" "/bin/example/**/*.bin")
(#P"EXAMPLE:PGM;**;*.*" "/pgm/example/**/*.*")
(#P"EXAMPLE:PGM;**;*" "/pgm/example/**/*")
(#P"EXAMPLE:**;*.*" "/example/**/*.*")
(#P"EXAMPLE:**;*" "/example/**/*")) ; implementation
specific.
--
__Pascal Bourguignon__
http://www.informatimago.com
More information about the pkg-common-lisp-devel
mailing list