~ chicken-core (chicken-5) 33ffee134e4dc30895ce22cc965249dccd7442d0


commit 33ffee134e4dc30895ce22cc965249dccd7442d0
Author:     felix <felix@y.(none)>
AuthorDate: Fri Mar 19 20:52:48 2010 +0100
Commit:     felix <felix@y.(none)>
CommitDate: Fri Mar 19 20:52:48 2010 +0100

    don't show backtrace when shell command fails in setup-api

diff --git a/rules.make b/rules.make
index 41518336..8995afde 100644
--- a/rules.make
+++ b/rules.make
@@ -1247,18 +1247,14 @@ html:
 
 clean:
 	-$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) chicken$(EXE) csi$(EXE) csc$(EXE) \
-	  $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
-	  $(CHICKEN_INSTALL_PROGRAM)$(EXE) \
-	  $(CHICKEN_UNINSTALL_PROGRAM)$(EXE) \
-	  $(CHICKEN_STATUS_PROGRAM)$(EXE) \
-	  $(CHICKEN_BUG_PROGRAM)$(EXE) *$(O) \
+	  chicken-profile$(EXE) csi-static$(EXE) \
+	  chicken-install$(EXE) chicken-uninstall$(EXE) chicken-status$(EXE) \
+	  csc-static$(EXE) chicken-static$(EXE) chicken-bug$(EXE) *$(O) \
 	  $(LIBCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE) \
 	  libchicken$(A) libuchicken$(A) libchicken$(SO) $(PROGRAM_IMPORT_LIBRARIES) \
-	  $(IMPORT_LIBRARIES:=.import.so) $(LIBCHICKEN_IMPORT_LIBRARY) \
-	  $(LIBUCHICKEN_IMPORT_LIBRARY) \
+	  $(IMPORT_LIBRARIES:=.import.so) $(LIBCHICKEN_IMPORT_LIBRARY) $(LIBUCHICKEN_IMPORT_LIBRARY) \
 	  setup-api.so setup-api.import.scm setup-download.so \
 	  setup-download.import.scm
-	  setup-api.c setup-download.c
 ifdef USES_SONAME
 	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) libchicken.so.$(BINARYVERSION)
 	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) libuchicken.so.$(BINARYVERSION)
diff --git a/setup-api.scm b/setup-api.scm
index 6d469299..bdefd72d 100644
--- a/setup-api.scm
+++ b/setup-api.scm
@@ -29,7 +29,7 @@
 ; This code is partially quite messy and the API is not overly consistent,
 ; mainly because it has grown "organically" while the old chicken-setup program
 ; evolved. The code was extracted and put into this module, without much
-; cleaning up. Nevertheless, it should work.
+; cleaning up.
 ;
 ; *windows-shell* and, to a lesser extent, 'sudo' processing knowledge is
 ; scattered in the code.
@@ -755,10 +755,16 @@
 		(string-append "\"" str "\"")	; double quotes, yes - thanks to Matthew Flatt
 		str))))
     (unless (zero? r)
-      (error "shell command failed with nonzero exit status" r str))))
+      (quit "shell command failed with nonzero exit status ~a:~%~%  ~a" r str))))
+
+(define (quit fstr . args)
+  (flush-output)
+  (fprintf (current-error-port) "~%~?~%" fstr args)
+  (reset))
 
 ;;; Module Setup
 
 ; User setup by default
 (user-install-setup)
+
 )
Trap