From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id uENzDtjyyWbVOQEAe85BDQ:P1 (envelope-from ) for ; Sat, 24 Aug 2024 14:48:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id uENzDtjyyWbVOQEAe85BDQ (envelope-from ) for ; Sat, 24 Aug 2024 16:48:56 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=NfgC9Tr0; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1724510936; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=8WPt1lIfIMeqvvQt3ps7WGMJ9a6FSVt/pVbRV7aApQ0=; b=W/c+cOhttbVViK7tAwa+MsVg7UQ9bgkl0g8c1ff95BwaUrbcf2ioiz3RqwTAWSXWbUvIso 94Q3uPPdPQz2+YOyo9ZZ0PXLRABwYDCip/p6kOfV3L4OhJNWHESq7fka9T/Ghp4haEknTc bBakSJBl58CXD1/zZ5bLR1vZLKk7/MJ731mT5NYV5eBVu4Y1AGFsEmSe+WyeNyrbB9MCVM P07PP179RKttahZkRUAF/bst725Bv/7LoE1xFbmsH2X3cdmMMySfdZ6hwzdz8ihQtrEtMw axigbrRCQiRgsCWg7U3FMVqyZdKNHeE9vwoXwwqHyAwx0EvTf0d7Jm1hhp/7Jw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=NfgC9Tr0; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1724510936; a=rsa-sha256; cv=none; b=kaUf7hJDEdYoRH2DHBB3XmEH4/y3Sw53DJatzTm5pNKeZR081RnJdTkHv4cs7cQmc5AFZ6 PoOK9mmRlHe3GcbuwaYCUK7NvxopfKszBs5u+gzp4UVejqXPPhhrow6MG61SvooVVqLwXZ k7eCa3IQH1TpLwqd885fIXM6JNPtcus1DtORSniHtxCrdr5rmBemIwSBnQFRSwuVEXr+Ko IrxFt/5gBJtrPwWGUryj9TffFGFQjIVyi2jPA1FddaLkUZyRfTOr0QcTDVFWKThKBUfV9H NR0/yJBOrteMtr2VI8UN1NjktG0u0sJ8xWaXFTWQTroJ8SgYyaV3q/SC5v4GqA== 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 8AFEE23B67 for ; Sat, 24 Aug 2024 16:48:55 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1shs3i-0004Mv-T4; Sat, 24 Aug 2024 10:48:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1shs3h-0004Mk-0O for guix-devel@gnu.org; Sat, 24 Aug 2024 10:48:05 -0400 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1shs3f-0003z0-Fa for guix-devel@gnu.org; Sat, 24 Aug 2024 10:48:04 -0400 Received: by mail-qk1-x744.google.com with SMTP id af79cd13be357-7a1d024f775so196408785a.2 for ; Sat, 24 Aug 2024 07:48:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724510882; x=1725115682; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=8WPt1lIfIMeqvvQt3ps7WGMJ9a6FSVt/pVbRV7aApQ0=; b=NfgC9Tr0P32VDgDY3XBdYWvVDiR8sm51g4A8W2hb5qVsq3gIH+ZxfIqCd4sjncWha1 8CAO70zkOJJgSPhHDpoVo1IclJGKY0ceYy8GXqOPXM2JwJJksSBCiBMkrrb49W8fPDE6 aOMHxoiDRiuFeskpEdU8DRv27ukJ2yrpF3MX3YJJU+1nuctZstM3zNz3pw8OFEsGdqXk oyiuD9uojleHwMM/CRkFv6OYF0BGcXU8t/a0IjrOViO+denrZba7TVttgQrwV0cFOeuH cpPYBuRfichGkT/S5oOSdppwWnRw5W7JDPSxqNQ/IDbBVNacGMNanOFDrTcHnjxXi+zg gFxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724510882; x=1725115682; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8WPt1lIfIMeqvvQt3ps7WGMJ9a6FSVt/pVbRV7aApQ0=; b=UgXyagjy7Xa26eZ0Y77NcqBxO5xdBxQyw4M/eekuWhrzwqQbjjoGpGHvTPBp/dr3JJ zF4yEwyXtufGaIaYq/xv7CZzKIjxptCnKNhP15csa+hAznxO2JsQ2rsUW56Ns8AxDL9j auYzI6dksembbk61ZKEKj4JVxQkQXeap+GKguwq+O+02ZogWgrGsYVCD1EjnGx0wfFaw 3IGIekVC2/JWv36UvpvLRAEx3DgPu/H54SHwbfYMRF36jnm2VlsQ2/slflxpJMYt7Yak vUYGY0EavCcb3JZ5B9aY35im8s0cc14OZXfsXSBi/Xul2S0HAXC5jse5t0YC6KpiCYMr kByA== X-Forwarded-Encrypted: i=1; AJvYcCWy+c45wpYl8tD8U9ndJqdYpE2lO62oe1kkZYD9qopRGPsd/SK2PuoZjAiYpFCMuWj6j3hrNJFJpR0O@gnu.org X-Gm-Message-State: AOJu0YzP5tdm7VmLxi5tMNwYEjOTupsYehsjacQ+oRO4As7OSGLWtz0q MWMaJ9/DSwWEiLBOY//F4OQzOQxSeRLfhpEe7P7uclh61JsbT38EPAU7p9KF X-Google-Smtp-Source: AGHT+IE6Dg8+OVEzthx4kMYuB/NU6iGpQObDo4XZhhJuLdNfamMPqYR0FDMn7BDvI6isdFshvAFjmQ== X-Received: by 2002:a05:620a:bc1:b0:79f:2cb:86a1 with SMTP id af79cd13be357-7a68979b6a9mr681508985a.54.1724510881954; Sat, 24 Aug 2024 07:48:01 -0700 (PDT) Received: from [127.0.0.1] ([188.244.176.51]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a67f319216sm286203185a.18.2024.08.24.07.48.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 24 Aug 2024 07:48:01 -0700 (PDT) Message-ID: <00be7dd1-ca5f-48a2-b89f-acb9f0d9c69f@gmail.com> Date: Sat, 24 Aug 2024 19:47:59 +0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Cookbook recipe from "The Repository as a Channel" section does not work for Guix with properly configured GUILE_LOAD_PATH To: "pelzflorian (Florian Pelz)" Cc: Attila Lendvai , guix-devel@gnu.org References: <63d4684d-7e8e-437b-91f5-ce20607ab882@gmail.com> <87ed6sebdp.fsf@pelzflorian.de> <4d2eb8d0-1bed-429d-a99e-a1ea182dec1c@gmail.com> <87ttfotjw1.fsf@pelzflorian.de> <87cymbyv57.fsf@pelzflorian.de> <87y14yq4wm.fsf@pelzflorian.de> <6fe218cd-2995-4d46-ba5f-3e262b730faf@gmail.com> <87sev1qzxm.fsf@pelzflorian.de> <8e565865-b601-46df-a4ce-2635f24151ff@gmail.com> <87ttfgwbvk.fsf@pelzflorian.de> <07bd739e-2444-46e3-beda-ff853b34f2cd@gmail.com> <87bk1np2a5.fsf@pelzflorian.de> <87bk1l88sx.fsf@pelzflorian.de> <26f24821-13e6-4afe-82a4-57cf60bf2064@gmail.com> <87cym0czto.fsf@pelzflorian.de> <5224b08c-90bb-4822-a89f-f6cf1bf8a6a9@gmail.com> <87ed6f5jhr.fsf@pelzflorian.de> Content-Language: en-US From: Nigko Yerden In-Reply-To: <87ed6f5jhr.fsf@pelzflorian.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::744; envelope-from=nigko.yerden@gmail.com; helo=mail-qk1-x744.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -9.78 X-Migadu-Queue-Id: 8AFEE23B67 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.78 X-TUID: g7pz6HiKOASh Hello Florian, pelzflorian (Florian Pelz) wrote: > While processing guile-package.scm, > > (search-path %load-path "guile-package.scm") > > returns an absolute path if and only if guile-package.scm is in the > load-path, like when using it from a channel. Then, your diff makes it > resolve symlinks. That's right. > If the configuration or package file is not in the load-path, > guile-package.scm is returned, absolute-dirname’s other `if' branch > calls `canonicalize-path' on all but the basename and directory symlinks > already got resolved. No, in this case 'search-path' returns #f. But if 'syntax-source' gives absolute path, then 'current-source-directory' returns 'dirname' of this path without calling 'absolute-dirname'. > Indeed with weird load-paths > > GUILE_LOAD_PATH=${GUILE_LOAD_PATH}:/home/florian/src/home-config/configs guix home reconfigure gnu.scm > > ;;; ("/gnu/store/nanvziq36krgh330yjhwpphcyfz5dyzm-guix-module-union/share/guile/site/3.0") > > because syntax-source says filename is > "gnu.scm". > > But not normally > > GUILE_LOAD_PATH=${GUILE_LOAD_PATH} guix home reconfigure gnu.scm > > ;;; ("/home/florian/src/home-config/configs") > > because syntax-source says filename is > "/home/florian/src/home-config/configs/gnu.scm". This observation shows that 'current-source-directory' is really bad because 'syntax-source' is bad. Sometimes 'syntax-source' gives an absolute path, and sometimes a relative one, and I don't understand under what conditions. And '(module-filename (current-module))' does not seem to be better. In my experiments it gives exactly the same filename as 'syntax-source'. But this bad behavior of 'current-source-directory' is unrelated to symlinks and 'if' condition in 'absolute-dirname'. All Guile load paths I have seen before are absolute paths, and the second branch of 'if' is not executed for them. Maybe we should leave 'absolute-dirname' alone, as well as 'current-source-directory', and consider 'local-file' more closely. Regards, Nigko