From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQLhZ-0002in-Bp for guix-patches@gnu.org; Sat, 16 Dec 2017 18:17:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQLhW-0000fZ-83 for guix-patches@gnu.org; Sat, 16 Dec 2017 18:17:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:57355) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eQLhW-0000fE-46 for guix-patches@gnu.org; Sat, 16 Dec 2017 18:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eQLhV-0006MA-Ug for guix-patches@gnu.org; Sat, 16 Dec 2017 18:17:01 -0500 Subject: [bug#29745] [PATCH 1/3] build: gnu-build-system: Disallow phase returning . References: <20171216231242.12032-1-arunisaac@systemreboot.net> In-Reply-To: <20171216231242.12032-1-arunisaac@systemreboot.net> Resent-Message-ID: From: Arun Isaac Date: Sun, 17 Dec 2017 04:46:15 +0530 Message-Id: <20171216231617.19133-1-arunisaac@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 29745@debbugs.gnu.org * guix/build/gnu-build-system.scm (gnu-build): Treat a phase returning as a failure. --- guix/build/gnu-build-system.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index e37b75140..e1653a395 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès +;;; Copyright © 2017 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -669,6 +670,9 @@ in order. Return #t if all the PHASES succeeded, #f otherwise." (+ (time-second diff) (/ (time-nanosecond diff) 1e9)))) + (define (true? object) + (if (unspecified? object) #f object)) + (setvbuf (current-output-port) _IOLBF) (setvbuf (current-error-port) _IOLBF) @@ -681,7 +685,7 @@ in order. Return #t if all the PHASES succeeded, #f otherwise." ((name . proc) (let ((start (current-time time-monotonic))) (format #t "starting phase `~a'~%" name) - (let ((result (apply proc args)) + (let ((result (true? (apply proc args))) (end (current-time time-monotonic))) (format #t "phase `~a' ~:[failed~;succeeded~] after ~,1f seconds~%" name result -- 2.15.1