[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

Debbugs page

Christopher Baines wrote 6 years ago
(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
Ludovic Courtès wrote 6 years ago
(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’.
Christopher Baines wrote 6 years ago
(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
?
Your comment

This issue is archived.

To comment on this conversation send an email to 36537@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 36537
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help