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: Thu, 03 Dec 2020 13:04:25 +0100 [thread overview]
Message-ID: <87im9j2j06.fsf@yamatai> (raw)
In-Reply-To: <87wnxzmdiy.fsf@ambrevar.xyz>
[-- Attachment #1: Type: text/plain, Size: 4684 bytes --]
Pierre Neidhardt <mail@ambrevar.xyz> skribis:
> Since staging was merged a few days ago, I've noticed an undesirable
> side-effect of our revamped asdf-build-system: the systems packages have
> priority over the user-local ones.
>
> Here is the default list of registries:
>
> --8<---------------cut here---------------start------------->8---
> (defparameter* *default-source-registries*
> '(environment-source-registry
> user-source-registry
> user-source-registry-directory
> default-user-source-registry
> system-source-registry
> system-source-registry-directory
> default-system-source-registry)
> "List of default source registries" "3.1.0.102")
> --8<---------------cut here---------------end--------------->8---
>
> `user-source-registry' points to what is read in
> ~/.config/common-lisp/source-registry.conf(.d/)?, so nothing by default.
>
> user-source-registry-directory reads what's in XDG_CONFIG_DIRS, and it
> finds the Guix packages there.
>
> The default-user-source-registry expands to
>
> --8<---------------cut here---------------start------------->8---
> (:SOURCE-REGISTRY (:TREE (:HOME "common-lisp/"))
> (:DIRECTORY (:HOME ".sbcl/systems/"))
> (:DIRECTORY
> #P"/home/ambrevar/.local/share/common-lisp/systems/")
> (:TREE #P"/home/ambrevar/.local/share/common-lisp/source/")
> :INHERIT-CONFIGURATION)
> --8<---------------cut here---------------end--------------->8---
>
> which is where I would drop my user-local packages.
>
> Finally, default-system-source-registry reads what's in XDG_DATA_DIRS,
> and it finds the packages there again, but it does not read the
> Guix-generated conf which collects the dependencies of each package.
>
>
>
> I believe the issue is that `user-source-registry-directory' should read
> from XDG_CONFIG_HOME, and not XDG_CONFIG_DIRS (which would make it
> redundant with `user-source-registry'). This would make it an upstream
> issue, but I wanted to double-check I properly understood the problem
> with the Guix community first.
>
> Guillaume, thoughts on this?
Our cl-asdf package definition has little patches for
'user-source-registry-directory' and
'user-output-translations-directory-pathname' to make ASDF read
configuration files in all the directories listed in 'XDG_CONFIG_DIRS'
(IIRC regular ASDF was only reading from the first valid one in
'XDG_CONFIG_HOME' or 'XDG_CONFIG_DIRS'):
--8<---------------cut here---------------start------------->8---
(substitute* dst-asdf
(("\\(xdg-config-pathname \\*source-registry-directory\\* direction\\)")
"`(:source-registry
,@(loop
for dir in (xdg-config-dirs
\"common-lisp/source-registry.conf.d/\")
collect `(:include ,dir))
:inherit-configuration)")
(("\\(xdg-config-pathname \\*output-translations-directory\\* direction\\)")
"`(:output-translations
,@(loop
for dir in (xdg-config-dirs
\"common-lisp/asdf-output-translations.conf.d/\")
collect `(:include ,dir))
:inherit-configuration)")))
--8<---------------cut here---------------end--------------->8---
I guess 'XDG_CONFIG_HOME' is missing here and we could add it in the
list before the 'XDG_CONFIG_DIRS' directories. Something like:
--8<---------------cut here---------------start------------->8---
(substitute* dst-asdf
(("\\(xdg-config-pathname \\*source-registry-directory\\* direction\\)")
"`(:source-registry
(:include (xdg-config-home \"common-lisp/source-registry.conf.d/\"))
,@(loop
for dir in (xdg-config-dirs
\"common-lisp/source-registry.conf.d/\")
collect `(:include ,dir))
:inherit-configuration)")
(("\\(xdg-config-pathname \\*output-translations-directory\\* direction\\)")
"`(:output-translations
(:include (xdg-config-home \"common-lisp/asdf-output-translations.conf.d/\"))
,@(loop
for dir in (xdg-config-dirs
\"common-lisp/asdf-output-translations.conf.d/\")
collect `(:include ,dir))
:inherit-configuration)")))
--8<---------------cut here---------------end--------------->8---
Or maybe we could make a better patch not changing
'user-source-registry-directory', but adding a new
'guix-source-registry' between 'default-user-source-registry' and
'system-source-registry' in the list of registries (and likewise for
output-translations).
I think this way the systems in '$HOME/.config/...', '$HOME/.local/...'
or '$HOME/common-lisp/...' will have priority on the ones in Guix
profiles.
What do you think?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
next prev parent reply other threads:[~2020-12-03 12:06 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 [this message]
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
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87im9j2j06.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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).