Bug in UIOP XDG implementation

Pascal J. Bourguignon pjb at informatimago.com
Fri Mar 27 22:57:48 UTC 2015

"Robert P. Goldman" <rpgoldman at sift.net> writes:

> Jason Miller wrote:
>> Hi,
>> With $XDG_CONFIG_DIRS unset, (uiop:user-configuration-directories)
>> returns only $XDG_CONFIG_HOME/common-lisp/
>> However, with it set to "/etc/xdg" it returns a list that starts with
>> "/etc/xdg/common-lisp"
>> There are two problems with this:
>> 1) The XDG Base Directory Specification says that "If $XDG_CONFIG_DIRS is
>>    either not set or empty, a value equal to /etc/xdg should be used."
>> 2) My understanding of uiop:user-configuration-directories is that it's
>> listed in order of importance, but, from the XDG spec:
>>     "The base directory defined by $XDG_CONFIG_HOME is considered more
>>      important than any of the base directories defined by
>> So, what I think is correct is that with $XDG_CONFIG_DIRS set it should
>> return a list starting with $XDG_CONFIG_HOME, followed by the lists in
>> $XDG_CONFIG_DIRS, and with it not set, should return a list of
>> $XDG_CONFIG_HOME followed by /etc/xdg/common-lisp/
>> Even if that's not correct, due to #1 the current implementation is
>> definitely wrong.
>> Regards,
>> Jason
> 1. Please put a ticket to this effect on the launchpad bugs page,
> https://launchpad.net/asdf.
> 2. I am not sure that this is a bug.  The XDG specifies how a general
> framework for user configuration should operate.  But AFAICT
> UIOP:USER-CONFIGURATION-DIRECTORIES doesn't claim to return something
> specified by this standard, but rather, claims to return a list of user
> configuration directories *FOR COMMON LISP* that somehow comply with the
> specification.  I.e., adding "common-lisp/" is acceptable.

But it's used with in-first-directory in

  (defun in-user-configuration-directory (x &key (direction :input))
    "return pathname under user configuration directory, subpathname X"
    (in-first-directory (user-configuration-directories) x 
                        :direction direction))

hence the problem.

__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk

More information about the asdf-devel mailing list