From: Guillaume Le Vaillant <glv@posteo.net>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: 45017@debbugs.gnu.org
Subject: bug#45017: asdf-build-system packages have priority over user ones
Date: Sat, 05 Dec 2020 11:03:21 +0100 [thread overview]
Message-ID: <87y2ick1sm.fsf@yamatai> (raw)
In-Reply-To: <874kl0sjbe.fsf@ambrevar.xyz>
[-- Attachment #1: Type: text/plain, Size: 2836 bytes --]
Pierre Neidhardt <mail@ambrevar.xyz> skribis:
> Tested!
>
> I've installed sbcl to my "common-lisp" profile along quri.
> I've also cloned quri to ~/common-lisp.
>
> Then:
>
> --8<---------------cut here---------------start------------->8---
> $ sbcl
> * (asdf:locate-system :quri)
> T
> NIL
> #P"/gnu/store/5gj1inwiqpn2fm9w384zd0grpyadx96m-sbcl-quri-0.1.0-2.b53231c/share/common-lisp/sbcl/quri/quri.asd"
> NIL
> NIL
> NIL
>
> ;; Indeed:
> * (asdf:user-source-registry-directory)
> #P"/gnu/store/75qppl3a062b138fkrn324qq8f912zqh-profile/etc/common-lisp/source-registry.conf.d/"
> --8<---------------cut here---------------end--------------->8---
>
> It does not work because the sbcl package definition sets the
> XDG_CONFIG_DIRS native search path which is picked by
> user-source-registry-directory, which has higher priority than
> default-user-source-registry.
>
> I think the flaw is ASDF's this time:
>
> --8<---------------cut here---------------start------------->8---
> (defun user-source-registry-directory (&key (direction :input))
> (xdg-config-pathname *source-registry-directory* direction))
>
> ;...
>
> (defun xdg-config-pathnames (&rest more)
> "Return a list of pathnames for application configuration.
> MORE may contain specifications for a subpath relative to these directories: a
> subpathname specification and keyword arguments as per RESOLVE-LOCATION \(see
> also \"Configuration DSL\"\) in the ASDF manual."
> (filter-pathname-set
> `(,(xdg-config-home more)
> ,@(xdg-config-dirs more))))
> --8<---------------cut here---------------end--------------->8---
>
> So the user registry looks into XDG_CONFIG_DIRS, while really it should
> just look at XDG_CONFIG_HOME.
>
The same test works for me. I think it's because I have
a ".config/common-lisp/source-registry.conf.d" directory (even if it's
empty), and '(user-source-registry-directory)' returns it instead of the
first directory in XDG_CONFIG_DIRS.
> So this patch should do (untested):
>
> --8<---------------cut here---------------start------------->8---
> - (defun user-source-registry-directory (&key (direction :input))
> - (xdg-config-pathname *source-registry-directory* direction))
> + (defun user-source-registry-directory (&key (direction :input))
> + (find-preferred-file (list (xdg-config-home *source-registry-directory*)) :direction direction))
> --8<---------------cut here---------------end--------------->8---
>
> If you confirm, then we should also report upstream I think.
>
> Cheers!
I don't know if the fact that ASDF can give priority to XDG_CONFIG_DIRS
over "~/common-lisp" is a feature or a bug, so you could ask upstream.
Anyway in our case, your patch makes sense since we always want to give
priority to "~/common-lisp" and other usual user directories. I'll add
it to our patch for cl-asdf.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
next prev parent reply other threads:[~2020-12-05 10:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 9:42 bug#45017: asdf-build-system packages have priority over user ones Pierre Neidhardt
2020-12-03 12:04 ` Guillaume Le Vaillant
2020-12-03 12:40 ` Pierre Neidhardt
2020-12-03 14:29 ` Guillaume Le Vaillant
2020-12-04 8:51 ` Pierre Neidhardt
2020-12-04 9:12 ` Guillaume Le Vaillant
2020-12-04 12:46 ` Pierre Neidhardt
2020-12-04 13:53 ` Guillaume Le Vaillant
2020-12-04 17:30 ` Guillaume Le Vaillant
2020-12-05 8:18 ` Pierre Neidhardt
2020-12-05 9:42 ` Guillaume Le Vaillant
2020-12-05 9:17 ` Pierre Neidhardt
2020-12-05 10:03 ` Guillaume Le Vaillant [this message]
2020-12-05 10:52 ` Guillaume Le Vaillant
2020-12-05 14:42 ` Pierre Neidhardt
2020-12-05 15:17 ` Guillaume Le Vaillant
2020-12-05 15:19 ` Pierre Neidhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y2ick1sm.fsf@yamatai \
--to=glv@posteo.net \
--cc=45017@debbugs.gnu.org \
--cc=mail@ambrevar.xyz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.