[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/06: ui: Properly report '&nar-error' conditions.
From: |
Ludovic Courtès |
Subject: |
03/06: ui: Properly report '&nar-error' conditions. |
Date: |
Sun, 08 Feb 2015 18:01:06 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit b7071bc5bb5fdf229c2f79e8b9ba06ecbf34e656
Author: Ludovic Courtès <address@hidden>
Date: Sun Feb 8 18:30:20 2015 +0100
ui: Properly report '&nar-error' conditions.
This is a followup to 46b8aad.
* guix/ui.scm (call-with-error-handling): Add 'nar-error?' case.
---
guix/ui.scm | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/guix/ui.scm b/guix/ui.scm
index f5ac5ed..696d0df 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -25,8 +25,9 @@
#:use-module (guix config)
#:use-module (guix packages)
#:use-module (guix profiles)
- #:use-module (guix build-system)
#:use-module (guix derivations)
+ #:use-module (guix build-system)
+ #:use-module (guix serialization)
#:use-module ((guix build utils) #:select (mkdir-p))
#:use-module ((guix licenses) #:select (license? license-name))
#:use-module (srfi srfi-1)
@@ -241,6 +242,14 @@ interpreted."
(leave (_ "generation ~a of profile '~a' does not exist~%")
(missing-generation-error-generation c)
(profile-error-profile c)))
+ ((nar-error? c)
+ (let ((file (nar-error-file c))
+ (port (nar-error-port c)))
+ (if file
+ (leave (_ "corrupt input while restoring '~a' from ~s~%")
+ file (or (port-filename port) port))
+ (leave (_ "corrupt input while restoring archive from ~s~%")
+ (or (port-filename port) port)))))
((nix-connection-error? c)
(leave (_ "failed to connect to `~a': ~a~%")
(nix-connection-error-file c)
- branch master updated (27e86be -> 027981d), Ludovic Courtès, 2015/02/08
- 01/06: gnu: guile-ssh: Correct post-installation test., Ludovic Courtès, 2015/02/08
- 02/06: build: Remove references to 'nix-setuid-helper'., Ludovic Courtès, 2015/02/08
- 04/06: ui: Simplify 'show-manifest-transaction' test., Ludovic Courtès, 2015/02/08
- 06/06: doc: Remove ".ko" extension in 'base-initrd' example., Ludovic Courtès, 2015/02/08
- 05/06: profiles: Distinguish downgrades from upgrades., Ludovic Courtès, 2015/02/08
- 03/06: ui: Properly report '&nar-error' conditions.,
Ludovic Courtès <=