From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id GEnENCVby1/YLQAA0tVLHw (envelope-from ) for ; Sat, 05 Dec 2020 10:04:21 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KJ2WMCVby1+wTQAAbx9fmQ (envelope-from ) for ; Sat, 05 Dec 2020 10:04:21 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 337D39402B1 for ; Sat, 5 Dec 2020 10:04:21 +0000 (UTC) Received: from localhost ([::1]:48638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klUQM-0001SR-S1 for larch@yhetil.org; Sat, 05 Dec 2020 05:04:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klUQ6-0001S8-Lv for bug-guix@gnu.org; Sat, 05 Dec 2020 05:04:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35031) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1klUQ6-0001ak-Ey for bug-guix@gnu.org; Sat, 05 Dec 2020 05:04:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1klUQ6-0000PT-9K for bug-guix@gnu.org; Sat, 05 Dec 2020 05:04:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#45017: asdf-build-system packages have priority over user ones Resent-From: Guillaume Le Vaillant Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 05 Dec 2020 10:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45017 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Pierre Neidhardt Received: via spool by 45017-submit@debbugs.gnu.org id=B45017.16071626151539 (code B ref 45017); Sat, 05 Dec 2020 10:04:02 +0000 Received: (at 45017) by debbugs.gnu.org; 5 Dec 2020 10:03:35 +0000 Received: from localhost ([127.0.0.1]:46577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klUPf-0000Ol-FK for submit@debbugs.gnu.org; Sat, 05 Dec 2020 05:03:35 -0500 Received: from mout02.posteo.de ([185.67.36.66]:33129) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klUPb-0000OR-KI for 45017@debbugs.gnu.org; Sat, 05 Dec 2020 05:03:34 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id F2C872400FB for <45017@debbugs.gnu.org>; Sat, 5 Dec 2020 11:03:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1607162605; bh=CEoKauWQA7gfAQSQNzkNCv0Ngb0dwslAs3xPNRx2sD8=; h=From:To:Cc:Subject:Date:From; b=PecVxB7eJfJP+ZOfGVuFXeI87+ihSlaj7m7zAnSUJdKI7HiFt6FoBcD9O5Rfhavd1 fL8JLF3sf3ZHfn0GTuUmI0GPAj+7+SdNWFZIO0kFPLVGp4pFdgH7Lapj+CeM8wjbCS XCY+XdeHRUHQRlpwBbQBJBMy5kIFH4PmgZAz7oD0awyPrAp6ZtSK8S6EgmkPQ61TwK 40w+k3ARlJ5+jZ8/oK7GdIGwj1bYc4rs1nRIPQF35LgNaMioMcUIliFPdBgvNhSJ/D OyI/r3ZymcV8I1NYF2i4PRCLHknSfEqpgRqWECVPJRi1IsdV51k0zmBaplO0q5+8qn vEtRx1X+8fdhg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Cp4s73ml4z6tmD; Sat, 5 Dec 2020 11:03:23 +0100 (CET) References: <87wnxzmdiy.fsf@ambrevar.xyz> <87im9j2j06.fsf@yamatai> <87360nm5b1.fsf@ambrevar.xyz> <87ft4n2cax.fsf@yamatai> <874kl0sjbe.fsf@ambrevar.xyz> User-agent: mu4e 1.4.13; emacs 27.1 From: Guillaume Le Vaillant In-reply-to: <874kl0sjbe.fsf@ambrevar.xyz> Date: Sat, 05 Dec 2020 11:03:21 +0100 Message-ID: <87y2ick1sm.fsf@yamatai> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45017@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.79 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=posteo.net header.s=2017 header.b=PecVxB7e; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 337D39402B1 X-Spam-Score: -2.79 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: JOjkucuQJyUU --=-=-= Content-Type: text/plain Pierre Neidhardt 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCX8ta6Q8cZ2x2QHBvc3Rl by5uZXQACgkQa+ggit8h/j84mAD/UGNSdhWLWWSnHbMkCoJqzDavOH1ZBME1mctC AbdqhDUA/3Pfy+5o+qmpXwuuGkbPIlxmwZVHfmpo12low3Rpdptb =cVLs -----END PGP SIGNATURE----- --=-=-=--