aboutsummaryrefslogtreecommitdiff
path: root/src/data.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-05-17 15:25:31 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-05-17 17:01:18 -0700
commite9349809a6bc129a875ff968f96fb87c5c3d84e6 (patch)
tree34bcb58222f5a995a91fc45ac8f34c24bf27d4d2 /src/data.lisp
parent239fdb142b2207898d7954e10f83ece97b627441 (diff)
downloadconsfigurator-e9349809a6bc129a875ff968f96fb87c5c3d84e6.tar.gz
output the compile and/or load output when debug level at least 3
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/data.lisp')
-rw-r--r--src/data.lisp40
1 files changed, 22 insertions, 18 deletions
diff --git a/src/data.lisp b/src/data.lisp
index 92f62df..53ca514 100644
--- a/src/data.lisp
+++ b/src/data.lisp
@@ -590,7 +590,7 @@ achieved by sending the return value of this function into a REPL's stdin.")
(error "Attempt to send unpreprocessed host to remote Lisp.
Preprocessing must occur in the root Lisp."))
- (flet ((wrap (forms)
+ (flet ((wrap (form)
;; We used to bind a handler here to invoke SKIP-DATA-SOURCES
;; upon MISSING-DATA-SOURCE, which means that remote Lisp images
;; were allowed to try querying data sources. Now we just bind
@@ -605,7 +605,7 @@ Preprocessing must occur in the root Lisp."))
;; root Lisp.
`(let ((*no-data-sources* t)
(*consfigurator-debug-level* ,*consfigurator-debug-level*))
- ,@forms)))
+ ,form)))
(let* ((intern-forms
(loop for (export . name)
in '((nil . "*NO-DATA-SOURCES*")
@@ -623,22 +623,26 @@ Preprocessing must occur in the root Lisp."))
;; (define-condition missing-data-source (error) ())
(require "asdf")
;; Hide the compile and/or load output unless there are
- ;; failures, as it's verbose and rarely of interest.
- (let ((string (make-array '(0)
- :element-type 'character
- :fill-pointer 0 :adjustable t)))
- (handler-case
- (with-output-to-string (stream string)
- (let ((*error-output* stream)
- (*standard-output* stream))
- ,(wrap (asdf-requirements-load-forms asdf-requirements))))
- (serious-condition (c)
- (format
- *error-output*
- "~&Failed to compile and/or load:~%~A~&~%Compile and/or load output:~%~%~A"
- c string)
- (uiop:quit 2))))
- ,(wrap `((%consfigure ',remaining-connections ,*host*))))))
+ ;; failures or the debug level is at least 3, as it's verbose
+ ;; and not usually of interest.
+ ,(wrap
+ `(let ((string
+ (make-array '(0) :element-type 'character
+ :fill-pointer 0 :adjustable t)))
+ (handler-case
+ (with-output-to-string (stream string)
+ (let ((*error-output* stream)
+ (*standard-output* stream))
+ ,@(asdf-requirements-load-forms asdf-requirements)))
+ (serious-condition (c)
+ (format
+ *error-output*
+ "~&Failed to compile and/or load:~%~A~&~%Compile and/or load output:~%~%~A"
+ c string)
+ (uiop:quit 2)))
+ (when (>= *consfigurator-debug-level* 3)
+ (format t "~&~A" string))))
+ ,(wrap `(%consfigure ',remaining-connections ,*host*)))))
(handler-case
(with-standard-io-syntax
(let ((*allow-printing-passphrases* t))