GNU bug report logs - #72867
[PATCH] gexp: Make 'local-file' follow symlinks.

Previous Next

Package: guix-patches;

Reported by: Nigko Yerden <nigko.yerden <at> gmail.com>

Date: Thu, 29 Aug 2024 06:10:01 UTC

Severity: normal

Tags: patch

Full log


Message #62 received at 72867 <at> debbugs.gnu.org (full text, mbox):

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>,
 Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>,
 Tobias Geerinckx-Rice <me <at> tobias.gr>, Nigko Yerden <nigko.yerden <at> gmail.com>,
 Christopher Baines <guix <at> cbaines.net>, Attila Lendvai <attila <at> lendvai.name>,
 72867 <at> debbugs.gnu.org
Subject: Re: [bug#72867] [PATCH v6] gexp: Make 'local-file' follow symlinks.
Date: Sun, 06 Oct 2024 09:09:00 +0200
My reply was lacking.  I accidentally deleted footnote
[1] https://git.savannah.gnu.org/cgit/guile.git/tree/

Ludovic Courtès <ludo <at> gnu.org> writes:
>> --- a/guix/utils.scm
>> +++ b/guix/utils.scm
>> @@ -1121,11 +1121,7 @@ (define absolute-dirname
>>      (match (search-path %load-path file)
>>        (#f #f)
>>        ((? string? file)
>> -       ;; If there are relative names in %LOAD-PATH, FILE can be relative and
>> -       ;; needs to be canonicalized.
>> -       (if (string-prefix? "/" file)
>> -           (dirname file)
>> -           (canonicalize-path (dirname file)))))))
>> +       (dirname (canonicalize-path file))))))
>
> Am I right that we cannot keep the ‘if’ here, as it would perform
> “lexical” dot-dot resolution instead of Unix resolution (accounting for
> symlinks), right?

Yes, exactly.

Does not the mlambda Ludo had put in absolute-dirname resolve all
canonicalize-path concerns?  There are many patches, but all have the
same file.

Regards,
Florian




This bug report was last modified 261 days ago.

Previous Next


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