GNU bug report logs -
#66659
(home-)on-first-login script broken when no gexps are added
Previous Next
Reported by: Nils Landt <nils <at> landt.email>
Date: Sat, 21 Oct 2023 06:15:01 UTC
Severity: normal
Done: Clément Lassieur <clement <at> lassieur.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66659 in the body.
You can then email your comments to 66659 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#66659
; Package
guix
.
(Sat, 21 Oct 2023 06:15:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Nils Landt <nils <at> landt.email>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Sat, 21 Oct 2023 06:15:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Error message:
ice-9/psyntax.scm:2824:12: In procedure syntax-violation:
Syntax error:
/home/nl/.guix-home/on-first-login:3:1233: source expression failed to match any pattern in form (when (claim-first-run flag-file-path))
As you can see, there is no body in the "when" expression.
Code in gnu/home/services.scm:438 :
(if (file-exists? xdg-runtime-dir)
(when (claim-first-run flag-file-path)
#$@gexps)
In my case, it appears that gexps is empty, resulting in the invalid syntax.
Broken by b92235ea8b06e304072bad55ae006593ea673568
Information forwarded
to
bug-guix <at> gnu.org
:
bug#66659
; Package
guix
.
(Sat, 21 Oct 2023 09:33:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 66659 <at> debbugs.gnu.org (full text, mbox):
On Sat, Oct 21 2023, Nils Landt wrote:
> ...
> As you can see, there is no body in the "when" expression.
>
> Code in gnu/home/services.scm:438 :
>
> (if (file-exists? xdg-runtime-dir)
> (when (claim-first-run flag-file-path)
> #$@gexps)
>
> In my case, it appears that gexps is empty, resulting in the invalid syntax.
Ah, yep, that's an issue. That issue was introduced in 6b0a32196982a0a2f4dbb59d35e55833a5545ac6.
I guess this raises a question about how to resolve this: if we have no gexps, do we still want to claim the first run?
If yes: we can add #t (or whatever) to the end of the "when" form to make sure it's never empty.
If no: we can generate an empty on-first-login script that does nothing.
The previous behaviour was to still claim the first run, so I'll send through a patch that does that.
Carlo
Information forwarded
to
, bug-guix <at> gnu.org
:
bug#66659
; Package
guix
.
(Sat, 21 Oct 2023 09:41:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 66659 <at> debbugs.gnu.org (full text, mbox):
* gnu/home/services.scm (compute-on-first-login-script): Ensure that WHEN is
syntactically valid in expansion.
---
gnu/home/services.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gnu/home/services.scm b/gnu/home/services.scm
index 651c068f79..3f018e3893 100644
--- a/gnu/home/services.scm
+++ b/gnu/home/services.scm
@@ -435,7 +435,10 @@ (define (compute-on-first-login-script _ gexps)
;; after complete logout/reboot.
(if (file-exists? xdg-runtime-dir)
(when (claim-first-run flag-file-path)
- #$@gexps)
+ #$@gexps
+ ;; An empty WHEN body is not syntactically valid, so we put an
+ ;; arbitrary form here to ensure it's not empty.
+ #t)
;; TRANSLATORS: 'on-first-login' is the name of a service and
;; shouldn't be translated
(warning (G_ "XDG_RUNTIME_DIR doesn't exists, on-first-login script
base-commit: 80c8f5b57aa3699445fab29e0f75f5955e697509
--
2.41.0
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Sat, 21 Oct 2023 14:16:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Nils Landt <nils <at> landt.email>
:
bug acknowledged by developer.
(Sat, 21 Oct 2023 14:16:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 66659-done <at> debbugs.gnu.org (full text, mbox):
Hi Carlo & Nils,
Carlo Zancanaro <carlo <at> zancanaro.id.au> skribis:
> On Sat, Oct 21 2023, Nils Landt wrote:
>> ...
>> As you can see, there is no body in the "when" expression.
>>
>> Code in gnu/home/services.scm:438 :
>>
>> (if (file-exists? xdg-runtime-dir)
>> (when (claim-first-run flag-file-path)
>> #$@gexps)
>>
>> In my case, it appears that gexps is empty, resulting in the invalid syntax.
>
> Ah, yep, that's an issue. That issue was introduced in 6b0a32196982a0a2f4dbb59d35e55833a5545ac6.
>
> I guess this raises a question about how to resolve this: if we have no gexps, do we still want to claim the first run?
>
> If yes: we can add #t (or whatever) to the end of the "when" form to make sure it's never empty.
>
> If no: we can generate an empty on-first-login script that does nothing.
>
> The previous behaviour was to still claim the first run, so I'll send through a patch that does that.
I’ve just pushed something similar to what you provided, Carlo, in
commit e098ba2f499bbddfea50c85058e4077e39b85513.
We should be good now.
Thank you!
Ludo’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#66659
; Package
guix
.
(Tue, 24 Oct 2023 10:07:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 66659 <at> debbugs.gnu.org (full text, mbox):
> help-debbugs <at> gnu.org hat am 21.10.2023 16:16 CEST geschrieben:
>
>
> Your bug report
>
> #66659: (home-)on-first-login script broken when no gexps are added
>
> which was filed against the guix package, has been closed.
>
> The explanation is attached below, along with your original report.
> If you require more details, please reply to 66659 <at> debbugs.gnu.org.
>
> --
> 66659: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66659
> GNU Bug Tracking System
> Contact help-debbugs <at> gnu.org with problems
> Hi Carlo & Nils,
>
> I’ve just pushed something similar to what you provided, Carlo, in
> commit e098ba2f499bbddfea50c85058e4077e39b85513.
>
> We should be good now.
I'm afraid this did not fix the issue. It results in
(when (claim-first-run flag-file-path) (begin))
which leads to the new error message "Syntax error:
/home/nl/.guix-home/on-first-login:3:1272: sequence of zero expressions in form (begin)"
Information forwarded
to
bug-guix <at> gnu.org
:
bug#66659
; Package
guix
.
(Tue, 24 Oct 2023 14:19:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 66659 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> > I've just pushed something similar to what you provided, Carlo, in
> > commit e098ba2f499bbddfea50c85058e4077e39b85513.
> >
> > We should be good now.
>
> I'm afraid this did not fix the issue. It results in
> (when (claim-first-run flag-file-path) (begin))
>
> which leads to the new error message "Syntax error:
> /home/nl/.guix-home/on-first-login:3:1272: sequence of zero expressions in form (begin)"
Adding *unspecified* works for me. I.e.:
(when (claim-first-run flag-file-path)
;; GEXPS can be empty, hence 'begin *unspecified*'. Having just
;; 'begin' without '*unspecified*' leads to
;; "Syntax error: ... sequence of zero expressions in form (begin)"
(begin *unspecified* #$@gexps))
The patch is in the attachment.
Cheers Bost
[0001-home-services-Fix-regression-in-generated-on-first-l.patch (text/x-patch, attachment)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#66659
; Package
guix
.
(Tue, 24 Oct 2023 23:21:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 66659 <at> debbugs.gnu.org (full text, mbox):
Nils Landt <nils <at> landt.email> writes:
>> I’ve just pushed something similar to what you provided, Carlo, in
>> commit e098ba2f499bbddfea50c85058e4077e39b85513.
>>
>> We should be good now.
>
> I'm afraid this did not fix the issue. It results in
> (when (claim-first-run flag-file-path) (begin))
>
> which leads to the new error message "Syntax error:
> /home/nl/.guix-home/on-first-login:3:1272: sequence of zero expressions in form (begin)"
Hi,
I just ran into the same issue.
Thanks,
Clément
Did not alter fixed versions and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 25 Oct 2023 13:23:01 GMT)
Full text and
rfc822 format available.
Reply sent
to
Clément Lassieur <clement <at> lassieur.org>
:
You have taken responsibility.
(Fri, 27 Oct 2023 14:55:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Nils Landt <nils <at> landt.email>
:
bug acknowledged by developer.
(Fri, 27 Oct 2023 14:55:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 66659-done <at> debbugs.gnu.org (full text, mbox):
On Tue, Oct 24 2023, Rostislav Svoboda wrote:
>> > I've just pushed something similar to what you provided, Carlo, in
>> > commit e098ba2f499bbddfea50c85058e4077e39b85513.
>> >
>> > We should be good now.
>>
>> I'm afraid this did not fix the issue. It results in
>> (when (claim-first-run flag-file-path) (begin))
>>
>> which leads to the new error message "Syntax error:
>> /home/nl/.guix-home/on-first-login:3:1272: sequence of zero expressions in form (begin)"
>
> Adding *unspecified* works for me. I.e.:
>
> (when (claim-first-run flag-file-path)
> ;; GEXPS can be empty, hence 'begin *unspecified*'. Having just
> ;; 'begin' without '*unspecified*' leads to
> ;; "Syntax error: ... sequence of zero expressions in form (begin)"
> (begin *unspecified* #$@gexps))
>
> The patch is in the attachment.
>
> Cheers Bost
Applied as 2de30042674197fe451c220745186e36465d06e2, thanks!
Clément
Information forwarded
to
bug-guix <at> gnu.org
:
bug#66659
; Package
guix
.
(Fri, 27 Oct 2023 22:24:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 66659 <at> debbugs.gnu.org (full text, mbox):
Hi,
Nils Landt <nils <at> landt.email> skribis:
> I'm afraid this did not fix the issue. It results in
> (when (claim-first-run flag-file-path) (begin))
>
> which leads to the new error message "Syntax error:
> /home/nl/.guix-home/on-first-login:3:1272: sequence of zero expressions in form (begin)"
Oops, my bad. (I did check at the REPL that (begin) was fine but forgot
that I was checking the top-level ‘begin’ form, which is not the same as
the sequencing ‘begin’ form…)
Rostislav Svoboda <rostislav.svoboda <at> gmail.com> skribis:
> Adding *unspecified* works for me. I.e.:
>
> (when (claim-first-run flag-file-path)
> ;; GEXPS can be empty, hence 'begin *unspecified*'. Having just
> ;; 'begin' without '*unspecified*' leads to
> ;; "Syntax error: ... sequence of zero expressions in form (begin)"
> (begin *unspecified* #$@gexps))
>
> The patch is in the attachment.
Thanks Rostislav and everyone, and apologies for not replying earlier!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 25 Nov 2023 12:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 208 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.