[PATCH] discovery: Handle edge case in scheme-files when looking at symlinks.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Christopher Baines
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal
C
C
Christopher Baines wrote on 7 Jul 2019 13:21
(address . guix-patches@gnu.org)
20190707112102.8908-1-mail@cbaines.net
Previously, this code would cause crashes in Guix (running guix package -s for
example) which could be experienced when Emacs creates temporary files in the
gnu/packages/patches directory when a patch file has been edited, but not
saved.

* guix/discovery.scm (scheme-files): Add else clause to cond used when
handling symlinks.
---
guix/discovery.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/guix/discovery.scm b/guix/discovery.scm
index 5bb494941b..86f20ec344 100644
--- a/guix/discovery.scm
+++ b/guix/discovery.scm
@@ -78,7 +78,9 @@ DIRECTORY is not accessible."
((= stat:type 'directory)
(append (scheme-files absolute)
result))
- (_ result)))))
+ (_ result)))
+ (else
+ result)))
(else
result))))))
'()
--
2.22.0
L
L
Ludovic Courtès wrote on 8 Jul 2019 12:59
(name . Christopher Baines)(address . mail@cbaines.net)(address . 36537@debbugs.gnu.org)
87a7doeqq8.fsf@gnu.org
Hi Chris,

Christopher Baines <mail@cbaines.net> skribis:

Toggle quote (8 lines)
> Previously, this code would cause crashes in Guix (running guix package -s for
> example) which could be experienced when Emacs creates temporary files in the
> gnu/packages/patches directory when a patch file has been edited, but not
> saved.
>
> * guix/discovery.scm (scheme-files): Add else clause to cond used when
> handling symlinks.

Good catch, LGTM!

Thank you,
Ludo’.
C
C
Christopher Baines wrote on 8 Jul 2019 18:56
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 36537-done@debbugs.gnu.org)
87a7doa2it.fsf@cbaines.net
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (14 lines)
> Hi Chris,
>
> Christopher Baines <mail@cbaines.net> skribis:
>
>> Previously, this code would cause crashes in Guix (running guix package -s for
>> example) which could be experienced when Emacs creates temporary files in the
>> gnu/packages/patches directory when a patch file has been edited, but not
>> saved.
>>
>> * guix/discovery.scm (scheme-files): Add else clause to cond used when
>> handling symlinks.
>
> Good catch, LGTM!

Great, I've pushed this now :)
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl0jdbpfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XfHhBAAogfkBqwL5CVozgXehUo2GNFwLEMm4ma/IqQ27FJ3E7u8l/ob6e0pGXih
fB2+m4bH+CUtanGzekS0QMT5UQ43vBkskv3ZW2evV5NJiMoK6UkNayAnds4K844O
w1D8BOi79mTeOpZH547qXPVQ/+kEBkfzMKU6Dk770vs2uFX+Uo1aO9eNAOKa6j7x
Wf5LD1cdQZ7LUBQ1ysrNLXyAfIyjlRGO0RCQjnrzCjaEV5sEuItvZQwWGks4E11B
PiRp7erzG34Ec+Cz13Gzsc77Ovh/MGkZHdPgt813JFnCFr2vM31LHV6GulvH4nGc
Go6qtfGXZBMIXJPqfDc3rvsAXcqpuO1snk4liUqf4/grqQJmlEdGU6tXL9aTT0ju
hgSKj9/bZEr+gAS/JnFy4EQKyB1lOKFjJF5p4jZyYXH1vqWQ4svdTtL89BF/Hl4K
t25O91M9xQlIEXwk1qw0mLgmtFadUNI0hxCjwDWIN7VP6qCn7xdziPInqqhsu52C
LkSDhvCjZ+6nA/JiQ8jSV+Vzk0uZDcu63BEds6JzNtpuNl86/7HAO55ClE2UsZcg
T5nqtD2eBr/qG6z7HKOE61KZP/5nn980UhcEDWVoApjCMtRLBkgcVggfT+Cz5cdr
HRhON/CW+zihKUB0dn62wWMBwuoStELBpViKuWyBGC9dtYkaVVc=
=Fsvq
-----END PGP SIGNATURE-----

Closed
?