guix pull -l fails on fresh user profiles

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Pierre Neidhardt
Owner
unassigned
Submitted by
Pierre Neidhardt
Severity
normal
P
P
Pierre Neidhardt wrote on 19 Jan 2019 18:55
(address . bug-guix@gnu.org)
874la48rd2.fsf@ambrevar.xyz
Switch to a new user, or simply log in as 'root' if you've never "guix
pull"ed with it, then

Toggle snippet (21 lines)
# guix pull -l
Backtrace:
8 (apply-smob/1 #<catch-closure 11508e0>)
In ice-9/boot-9.scm:
705:2 7 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
In ice-9/eval.scm:
619:8 6 (_ #(#(#<directory (guile-user) 11d2140>)))
In guix/ui.scm:
1644:12 5 (run-guix-command _ . _)
In ice-9/boot-9.scm:
829:9 4 (catch srfi-34 #<procedure 2e24be0 at guix/ui.scm:622:…> …)
829:9 3 (catch system-error #<procedure 2e24c80 at guix/script…> …)
829:9 2 (catch git-error #<procedure 2e24b40 at guix/scripts/p…> …)
829:9 1 (catch system-error #<procedure 2e28c40 at guix/script…> …)
In unknown file:
0 (raise #<condition &profile-not-found-error [profile: "…>)

ERROR: In procedure raise:
Wrong type (expecting exact integer): #<condition &profile-not-found-error [profile: "/var/guix/profiles/per-user/root/current-guix"] 2e1e8c0>

I think we should make `guix pull -l' return a value that can be used
meaningfully in deployment scripts. For instance, a non-zero
exit code could mean this is a fresh user profile.

Thoughts?

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlxDZHkACgkQm9z0l6S7
zH8Blgf+PNx3Jo2A7aYdTcv7zrZ4cpwRlFxDDO4doIhxSejrrtI1jGHJiVrfDoe3
HVRliSYQh9fY9VR5ex9nK/19dDTCuP8OiN3ZNulY5vusdVu6uTF67K+T87iphYM6
QPtMkxUqPhMEG71Iij84DFKiKOLUREeu5+TMxSzNCggJXSlJN57o8zrOv+XyPi9Q
vAZ//Sfht/sr8INWA9n1Em0BzFQi4OyqFJsB3PgziH4lndjf+4CkzyaFjc5AIMC0
CXW0YhquNWUmjKh+TM/rwsCY5tAXgFnzIAz0+tsgD3Xha68AQgm2yUKsw3agbmnp
KjQF7xy+3wKvfksKUfCZHV00Rs2+iw==
=p0ST
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 20 Jan 2019 23:56
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 34136-done@debbugs.gnu.org)
87sgxnlyzr.fsf@gnu.org
Pierre Neidhardt <mail@ambrevar.xyz> skribis:

Toggle quote (23 lines)
> Switch to a new user, or simply log in as 'root' if you've never "guix
> pull"ed with it, then
>
> # guix pull -l
> Backtrace:
> 8 (apply-smob/1 #<catch-closure 11508e0>)
> In ice-9/boot-9.scm:
> 705:2 7 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
> In ice-9/eval.scm:
> 619:8 6 (_ #(#(#<directory (guile-user) 11d2140>)))
> In guix/ui.scm:
> 1644:12 5 (run-guix-command _ . _)
> In ice-9/boot-9.scm:
> 829:9 4 (catch srfi-34 #<procedure 2e24be0 at guix/ui.scm:622:…> …)
> 829:9 3 (catch system-error #<procedure 2e24c80 at guix/script…> …)
> 829:9 2 (catch git-error #<procedure 2e24b40 at guix/scripts/p…> …)
> 829:9 1 (catch system-error #<procedure 2e28c40 at guix/script…> …)
> In unknown file:
> 0 (raise #<condition &profile-not-found-error [profile: "…>)
>
> ERROR: In procedure raise:
> Wrong type (expecting exact integer): #<condition &profile-not-found-error [profile: "/var/guix/profiles/per-user/root/current-guix"] 2e1e8c0>

Fixed in c49b45c917eff17122aea5f7a57ae4cef02f1003. A missing import and
the wrong ‘raise’ was being used.

Toggle quote (4 lines)
> I think we should make `guix pull -l' return a value that can be used
> meaningfully in deployment scripts. For instance, a non-zero
> exit code could mean this is a fresh user profile.

Yep, that’s what was intended and what happens now. :-)

Thanks,
Ludo’.
Closed
P
P
Pierre Neidhardt wrote on 21 Jan 2019 08:42
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 34136-done@debbugs.gnu.org)
87pnsq78y5.fsf@ambrevar.xyz
Great, thanks!

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlxFd/IACgkQm9z0l6S7
zH+pxQgApFCQRlqyEG2gz2Tl7MWIeoWDi3fRxZLmJ0ju822C3/WbJSai1eFZSFPu
ypg1PN+BlT/oNmyJSlIc10IuYFOBTouKM7W2znoYnhSCjm1ovTgCipkIAqqdBGkQ
wtHCrbsa0Z7ELLQdHDC9tPf5M4TSYu1gB3vBmLlvcQjtG3dNw0qlBT+fMLtFtMiC
2KPBZX3LZpmwYexSQ3Bxqsp35++bLZh27/fzbSqQA0YX9c6uhxtS9Cns3cqsZQmc
srz0tKfnr+ZrnF5cS7TvxSr2IPKgkFEP+XTPSFSrLtiWetU4wM3/LFPpknZQccAF
9ETJNwSAXH4S18in0bLFUoOi16/Gvw==
=JfF6
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 34136
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