From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: User-Friendlyness of Guix and non-scaryness, printing messages Date: Sun, 28 May 2017 21:01:46 +0200 Message-ID: <20170528210146.530b3f17@scratchpost.org> References: <87bbe3e5.AEAAKL2r-KIAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZGcQo@mailjet.com> <87y3tw4kw3.fsf@gnu.org> <87r2zfx0xt.fsf@gnu.org> <427678e8.AEUAKjfDcSgAAAAAAAAAAAPB0agAAAACwQwAAAAAAAW9WABZKceD@mailjet.com> <20170528204437.6dfd35c4@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dF3Rt-0004F9-Qk for guix-devel@gnu.org; Sun, 28 May 2017 15:01:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dF3Rq-00063P-PW for guix-devel@gnu.org; Sun, 28 May 2017 15:01:57 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:36088) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dF3Rq-00063B-Is for guix-devel@gnu.org; Sun, 28 May 2017 15:01:54 -0400 Received: from localhost (77.118.168.222.wireless.dyn.drei.com [77.118.168.222]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 5A0C01CA0710 for ; Sun, 28 May 2017 21:01:50 +0200 (CEST) In-Reply-To: <20170528204437.6dfd35c4@scratchpost.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Aha, much better: diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index f050fad97..e4a3a98a1 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -196,6 +196,7 @@ specified in MANIFEST, a manifest object." (when (equal? profile %current-profile) (ensure-default-profile)) + (parameterize ((current-build-output-port (%make-void-port "w"))) (let* ((prof-drv (run-with-store store (profile-derivation manifest #:hooks (if bootstrap? @@ -230,7 +231,7 @@ specified in MANIFEST, a manifest object." count) count) (display-search-paths entries (list profile) - #:kind 'prefix)))))))) + #:kind 'prefix))))))))) ^L ;;; As I understand it, for failed builds, it will still retain the log file and all the log messages even after this, right? Now to adapt guix system, too - looks more difficult. Would it be possible to make a custom port that just waits for a line to be printed, then prints some custom text to stderr only, and so on? For the spinner, like: In pseudo-code: class port: while True: line = port.readline() sys.stderr.write("\\") line = port.readline() sys.stderr.write("|") line = port.readline() sys.stderr.write("/") line = port.readline() sys.stderr.write("-")