Hi, Simon Chopin <chopin.si...@gmail.com> writes:
> Package: clfswm > Version: 20111015.git51b0a02-1 > Severity: grave > Justification: renders package unusable > > Hi, > > When trying to start clfswm, I just get this error message and then the > program exits : > > *** - Component "clfswm" not found > It's a bug from cl-asdf 2:2.018-1. Actually, ASDF cannot find any system in /usr/share/common-lisp/ if you use :DEFAULT-REGISTRY in your `source-registry.conf'. Check the following two test cases: Test Case 1 ----------- $ cat ~/.config/common-lisp/source-registry.conf ;; -*- mode: lisp -*- (:source-registry (:default-registry) ;; <1> (:ignore-inherited-configuration)) $ clisp -norc -q [1]> (find-package :asdf) NIL [2]> (load #P"/usr/share/common-lisp/source/cl-asdf/asdf.lisp") ;; Loading file /usr/share/common-lisp/source/cl-asdf/asdf.lisp ... ;; Loaded file /usr/share/common-lisp/source/cl-asdf/asdf.lisp T [3]> (in-package :asdf) #<PACKAGE ASDF> ASDF[4]> (find-system :clfswm) *** - Component "clfswm" not found The following restarts are available: ABORT :R1 Abort main loop Break 1 ASDF[5]> :r1 ASDF[6]> Test Case 2 ----------- $ cat ~/.config/common-lisp/source-registry.conf ;; -*- mode: lisp -*- (:source-registry (:tree "/usr/share/common-lisp/source/") ;; <2> (:ignore-inherited-configuration)) $ clisp -norc -q [1]> (find-package :asdf) NIL [2]> (load #P"/usr/share/common-lisp/source/cl-asdf/asdf.lisp") ;; Loading file /usr/share/common-lisp/source/cl-asdf/asdf.lisp ... ;; Loaded file /usr/share/common-lisp/source/cl-asdf/asdf.lisp T [3]> (in-package :asdf) #<PACKAGE ASDF> ASDF[4]> (find-system :clfswm) ;; Loading file /usr/share/common-lisp/source/clfswm/clfswm.asd ... WARNING: Invalid version "Please, see in src/version.lisp" for component "clfswm" ;; Loaded file /usr/share/common-lisp/source/clfswm/clfswm.asd #<SYSTEM "clfswm"> ASDF[5]> Why does test case 1 fail? Because :DEFAULT-REGISTRY (<1>) is in `source-registry.conf'. Here is the definition of DEFAULT-SOURCE-REGISTRY: (defun* default-source-registry () `(:source-registry #+sbcl (:directory ,(try-subpathname (user-homedir) ".sbcl/systems/")) (:directory ,(default-directory)) ,@(loop :for dir :in `(,@(when (os-unix-p) `(,(or (getenv "XDG_DATA_HOME") (try-subpathname (user-homedir) ".local/share/")) ,@(split-string (or (getenv "XDG_DATA_DIRS") "/usr/local/share:/usr/share") <1> :separator ":"))) ,@(when (os-windows-p) `(,(or #+lispworks (sys:get-folder-path :local-appdata) (getenv "LOCALAPPDATA")) ,(or #+lispworks (sys:get-folder-path :appdata) (getenv "APPDATA")) ,(or #+lispworks (sys:get-folder-path :common-appdata) (getenv "ALLUSERSAPPDATA") (try-subpathname (getenv "ALLUSERSPROFILE") "Application Data/"))))) :collect `(:directory ,(try-subpathname dir "common-lisp/systems/")) <2> :collect `(:tree ,(try-subpathname dir "common-lisp/source/"))) <3> :inherit-configuration)) At <1>, "/usr/share" doesn't end with /, so <2> & <3> return NIL (since /usr/common-lisp/ doesn't exist). TRY-SUBPATHNAME simply passes "/usr/share" to SUBPATHNAME, whose definition is: (defun* subpathname (pathname subpath &key type) (and pathname (merge-pathnames* (coerce-pathname subpath :type type) (pathname-directory-pathname pathname)))) Here (pathname-directory-pathname "/usr/share") returns "/usr/", then (subpathname "/usr/share" "common-lisp/source/") returns "/usr/common-lisp/source/", which doesn't exist. TRY-SUBPATHNAME just tests the existence of the return pathname of SUBPATHNAME. So TRY-SUBPATHNAME returns NIL here since the pathname doesn't exist. That's why DEFAULT-SOURCE-REGISTRY goes wrong. So how can you fix it until the new release is uploaded? Try to set XDG_DATA_DIRS to "/usr/local/share/:/usr/share/". But as SUBPATHNAME is also used otherwhere, I recommend that you redefine it: (defun* subpathname (pathname subpath &key type) (and pathname (merge-pathnames* (coerce-pathname subpath :type type) (pathname-directory-pathname (or (ignore-errors (ensure-directory-pathname pathname)) pathname))))) Thanks, Des _______________________________________________ pkg-common-lisp-devel mailing list pkg-common-lisp-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-common-lisp-devel