From: swedebugia@riseup.net
To: 33238@debbugs.gnu.org
Cc: bug-Guix <bug-guix-bounces+swedebugia=riseup.net@gnu.org>
Subject: bug#33238: Fail nicely when profile is not found
Date: Mon, 17 Dec 2018 03:04:04 -0800 [thread overview]
Message-ID: <8eb75951106df8ab37ad625d05dfc365@riseup.net> (raw)
In-Reply-To: <3c9c7b9e-90ce-a70e-2850-b4e32d719f04@riseup.net>
On 2018-11-02 09:00, swedebugia wrote:
> Hi
>
> I installed guix from AUR and ran into this:
>
> $ guix pull -l
> Backtrace:
> 8 (apply-smob/1 #<catch-closure 55dd9a29b6e0>)
> 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) 55dd9a356140>)))
> In guix/ui.scm:
> 1578:12 5 (run-guix-command _ . _)
> In ice-9/boot-9.scm:
> 829:9 4 (catch srfi-34 #<procedure 55dd9b57f7e0 at guix/ui.scm…> …)
> 829:9 3 (catch system-error #<procedure 55dd9b57f880 at guix/s…> …)
> 829:9 2 (catch git-error #<procedure 55dd9b57f640 at guix/scri…> …)
> 829:9 1 (catch system-error #<procedure 55dd9acab900 at guix/s…> …)
> 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: "/home/egil/.config/guix/current"]
> 55dd9ac9a240>
>
> The install went fine but guix is not working :/ so I will do a manual
> binary install instead.
>
> I could try crafting a patch testing if the directory exist if
> somebody is willing to point me to the right file (and perhaps an
> example of a procedure that can check this)
>
> Cheers
> Swedebugia
>
> $ guix --version
> guix (GNU Guix) 0.15.0
> Copyright (C) 2018 the Guix authors
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
This is still present:
sdb@antelope ~/src/guix$ ./pre-inst-env guix describe
Git checkout:
repository: /home/sdb/src/guix
branch: HEAD
commit: c4cc1b9d20212369d485a7b3788160117926ea3b
sdb@antelope ~/src/guix$ ./pre-inst-env guix pull -l
Backtrace:
8 (apply-smob/1 #<catch-closure 9e6d4c0>)
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) 9e5e910>)))
In guix/ui.scm:
1603:12 5 (run-guix-command _ . _)
In ice-9/boot-9.scm:
829:9 4 (catch srfi-34 #<procedure aa39860 at guix/ui.scm:615:…> …)
829:9 3 (catch system-error #<procedure aa398b0 at guix/script…> …)
829:9 2 (catch git-error #<procedure aa39810 at guix/scripts/p…> …)
829:9 1 (catch system-error #<procedure aa39030 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/sdb/current-guix"] aa10550>
The relevant code from pull.scm is this:
(define (process-query opts profile)
"Process any query on PROFILE specified by OPTS."
(match (assoc-ref opts 'query)
(('list-generations pattern)
(define (list-generations profile numbers)
(match numbers
((first rest ...)
(display-profile-content profile first)
(let loop ((numbers numbers))
(match numbers
((first second rest ...)
(display-profile-content-diff profile
first second)
(loop (cons second rest)))
((_) #t)
(() #t))))))
(leave-on-EPIPE
(cond ((not (file-exists? profile)) ; XXX: race condition
(raise (condition (&profile-not-found-error
(profile profile)))))
((string-null? pattern)
(list-generations profile (profile-generations profile)))
((matching-generations pattern profile)
=>
(match-lambda
(()
(exit 1))
((numbers ...)
(list-generations profile numbers)))))))))
--
Cheers
Swedebugia
prev parent reply other threads:[~2018-12-17 11:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 8:00 bug#33238: Fail nicely when profile is not found swedebugia
2018-12-17 11:04 ` swedebugia [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8eb75951106df8ab37ad625d05dfc365@riseup.net \
--to=swedebugia@riseup.net \
--cc=33238@debbugs.gnu.org \
--cc=bug-guix-bounces+swedebugia=riseup.net@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).