From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id f72HOb3Fdl/PRAAA0tVLHw (envelope-from ) for ; Fri, 02 Oct 2020 06:16:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SHKnNL3Fdl+MIQAAB5/wlQ (envelope-from ) for ; Fri, 02 Oct 2020 06:16:29 +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 8381294023B for ; Fri, 2 Oct 2020 06:16:29 +0000 (UTC) Received: from localhost ([::1]:44960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kOEMm-0001Qq-Fi for larch@yhetil.org; Fri, 02 Oct 2020 02:16:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOEMN-0001LP-HF for bug-guix@gnu.org; Fri, 02 Oct 2020 02:16:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kOEMM-00038f-WF for bug-guix@gnu.org; Fri, 02 Oct 2020 02:16:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kOEMM-0005YN-RY for bug-guix@gnu.org; Fri, 02 Oct 2020 02:16:02 -0400 Subject: bug#43736: The local-file()'s error message is misleading. In-Reply-To: <3abd04a2adce73691b7ff963099d47ce@disroot.org> Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Date: Fri, 02 Oct 2020 06:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 43736 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: "Vitaliy Shatrov" Mail-Followup-To: 43736@debbugs.gnu.org, ludo@gnu.org, guix.vits@disroot.org Received: via spool by 43736-done@debbugs.gnu.org id=D43736.160161930818011 (code D ref 43736); Fri, 02 Oct 2020 06:16:02 +0000 Received: (at 43736-done) by debbugs.gnu.org; 2 Oct 2020 06:15:08 +0000 Received: from localhost ([127.0.0.1]:39170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOELU-0004g6-5c for submit@debbugs.gnu.org; Fri, 02 Oct 2020 02:15:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOELS-0004Yl-PZ for 43736-done@debbugs.gnu.org; Fri, 02 Oct 2020 02:15:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41358) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kOELN-0002sb-Hk; Fri, 02 Oct 2020 02:15:01 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53860 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kOELJ-0002AY-IM; Fri, 02 Oct 2020 02:15:00 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <3abd04a2adce73691b7ff963099d47ce@disroot.org> Date: Fri, 02 Oct 2020 08:14:56 +0200 Message-ID: <87zh55kvbz.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 43736-done@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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-Spam-Score: -1.51 X-TUID: wDIau8IKgBOF Hi, "Vitaliy Shatrov" skribis: > ;; (define (custom-local-file str) ; shorthand, preserves pe= rmissions > ;; (let* ((file (local-file str #:recursive? #t)) > ;; (dir (dirname (local-file-absolute-file-name file)))) > ;; (display (string-append "loading local file '" str "' from " dir "= ...\n")) > ;; file)) [...] > ;; (auto-login (custom-local-file "auto-login")) > ;; (syslog.conf (custom-local-file "syslog.conf"))) This will not have the desired effect. =E2=80=98local-file=E2=80=99 is spe= cial syntax: it captures the source directory so that at run time it can resolve file names relative to the source directory. The =E2=80=98custom-local-file=E2=80=99 procedure does not do that. Conseq= uently, file names get resolved relative to $PWD instead. Commit f43ffee90882c2d61b46d69728daa7432be297e4 improves on that by emitting a warning at run time when =E2=80=98local-file=E2=80=99 is passed = a non-literal relative file name. Thanks, Ludo=E2=80=99.