GNU bug report logs - #45017
asdf-build-system packages have priority over user ones

Previous Next

Package: guix;

Reported by: Pierre Neidhardt <mail <at> ambrevar.xyz>

Date: Thu, 3 Dec 2020 09:43:02 UTC

Severity: normal

Done: Guillaume Le Vaillant <glv <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 45017 <at> debbugs.gnu.org
Subject: bug#45017: asdf-build-system packages have priority over user ones
Date: Sat, 05 Dec 2020 10:17:41 +0100
[Message part 1 (text/plain, inline)]
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.

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!

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 4 years and 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.