Broken source-registry

Bug #982285 reported by pipping
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
Fix Released
High
Faré

Bug Description

Revision dcdd0c561f5302f4fc6d3e3bfa0c4f3087d16316 a.k.a. asdf 2.014.4 appears to have introduced a bug.

Prior to that version, running

sbcl --eval '(require :asdf)' --eval '(in-package :asdf)' --eval '(print (default-source-registry))' --eval '(sb-ext:quit)

would print the following for me:

(:SOURCE-REGISTRY (:DIRECTORY #P"/home/pipping/.sbcl/systems/")
 (:DIRECTORY #P"/home/pipping/tmp/sbcl-1.0.56/")
 (:DIRECTORY #P"/home/pipping/.local/share/common-lisp/systems/")
 (:TREE #P"/home/pipping/.local/share/common-lisp/source/")
 (:DIRECTORY #P"/usr/local/share/common-lisp/systems/")
 (:TREE #P"/usr/local/share/common-lisp/source/")
 (:DIRECTORY #P"/usr/share/common-lisp/systems/")
 (:TREE #P"/usr/share/common-lisp/source/") :INHERIT-CONFIGURATION)

With 2.014.4, it started printing

(:SOURCE-REGISTRY (:DIRECTORY #P"/home/pipping/.sbcl/systems/")
 (:DIRECTORY #P"/home/pipping/tmp/sbcl-1.0.56/")
 (:DIRECTORY #P"/home/pipping/.local/share/common-lisp/systems/")
 (:TREE #P"/home/pipping/.local/share/common-lisp/source/") (:DIRECTORY NIL)
 (:TREE NIL) :INHERIT-CONFIGURATION)

Anything under /usr/ is missing.

The reason for that is the following change:

           `(,@(when (os-unix-p)
                `(,(or (getenv-absolute-pathname "XDG_DATA_HOME")
                        (subpathname (user-homedir) ".local/share/"))
- ,@(split-string (or (getenv "XDG_DATA_DIRS")
- "/usr/local/share:/usr/share")
- :separator ":")))
+ ,@(or (getenv-absolute-pathnames "XDG_DATA_DIRS")
+ '("/usr/local/share" "/usr/share"))))
             ,@(when (os-windows-p)
                 `(,(or #+lispworks (sys:get-folder-path :local-appdata)
                        (getenv-absolute-pathname "LOCALAPPDATA"))

in the definition of default-source-registry. While the expression (getenv "XDG_DATA_DIRS") would return nil if XDG_DATA_DIRS is unset (it is for me), the expression (getenv-absolute-pathnames "XDG_DATA_DIRS") yields (nil) in that case, which is true, so the or-expression immediately returns (nil).

Since sbcl 1.0.56 comes with asdf 2.20, that version (but not 1.0.55) is affected by this issue.

Revision history for this message
Faré (fahree) wrote :

Oops. Fixed in 2.20.15. Thanks a lot for noticing and narrowing down the issue!

Changed in asdf:
assignee: nobody → Faré (fahree)
importance: Undecided → High
milestone: none → version2.1
status: New → Fix Committed
Revision history for this message
Faré (fahree) wrote :

Was released in 2.21.

Changed in asdf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.