From: "Ludovic Courtès" <ludo@gnu.org>
To: "Vitaliy Shatrov" <guix.vits@disroot.org>
Cc: 43736-done@debbugs.gnu.org
Subject: bug#43736: The local-file()'s error message is misleading.
Date: Fri, 02 Oct 2020 08:14:56 +0200 [thread overview]
Message-ID: <87zh55kvbz.fsf@inria.fr> (raw)
In-Reply-To: <3abd04a2adce73691b7ff963099d47ce@disroot.org>
Hi,
"Vitaliy Shatrov" <guix.vits@disroot.org> skribis:
> ;; (define (custom-local-file str) ; shorthand, preserves permissions
> ;; (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. ‘local-file’ is special syntax:
it captures the source directory so that at run time it can resolve file
names relative to the source directory.
The ‘custom-local-file’ procedure does not do that. Consequently, file
names get resolved relative to $PWD instead.
Commit f43ffee90882c2d61b46d69728daa7432be297e4 improves on that by
emitting a warning at run time when ‘local-file’ is passed a non-literal
relative file name.
Thanks,
Ludo’.
next prev parent reply other threads:[~2020-10-02 6:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-01 4:56 bug#43736: The local-file()'s error message is misleading Vitaliy Shatrov
2020-10-02 6:14 ` Ludovic Courtès [this message]
2020-10-02 6:54 ` bug#43736: I think f43ffee... broke guix pull Brendan Tildesley
2020-10-03 9:25 ` Ludovic Courtès
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=87zh55kvbz.fsf@inria.fr \
--to=ludo@gnu.org \
--cc=43736-done@debbugs.gnu.org \
--cc=guix.vits@disroot.org \
/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).