From patchwork Thu Jul 14 14:58:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Csepp X-Patchwork-Id: 40650 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BE6A227BBEA; Thu, 14 Jul 2022 16:00:30 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8028D27BBE9 for ; Thu, 14 Jul 2022 16:00:30 +0100 (BST) Received: from localhost ([::1]:55008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oC0KL-0005Km-6O for patchwork@mira.cbaines.net; Thu, 14 Jul 2022 11:00:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oC0Ju-0005Jc-Us for guix-patches@gnu.org; Thu, 14 Jul 2022 11:00:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40833) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oC0Ju-0007Jq-Kx for guix-patches@gnu.org; Thu, 14 Jul 2022 11:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oC0Ju-0004RC-GF for guix-patches@gnu.org; Thu, 14 Jul 2022 11:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56558] [PATCH] build: Simpler percentage calculation. Resent-From: raingloom Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 14 Jul 2022 15:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56558 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56558@debbugs.gnu.org Cc: raingloom X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165781079217008 (code B ref -1); Thu, 14 Jul 2022 15:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Jul 2022 14:59:52 +0000 Received: from localhost ([127.0.0.1]:38592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC0Jk-0004QG-1S for submit@debbugs.gnu.org; Thu, 14 Jul 2022 10:59:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:41692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC0Ji-0004Q8-MQ for submit@debbugs.gnu.org; Thu, 14 Jul 2022 10:59:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oC0Ji-0004tf-Gt for guix-patches@gnu.org; Thu, 14 Jul 2022 10:59:50 -0400 Received: from mx1.riseup.net ([198.252.153.129]:43340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oC0Jg-0007Gw-5a for guix-patches@gnu.org; Thu, 14 Jul 2022 10:59:49 -0400 Received: from fews2.riseup.net (fews2-pn.riseup.net [10.0.1.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4LkHhf4gmWzDrXX for ; Thu, 14 Jul 2022 14:59:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1657810786; bh=fzL9MmKZHjHsWw4Fn0rJKtE7sxgm70HQBtuIXcqsJrE=; h=From:To:Cc:Subject:Date:From; b=EaVH86Kz2TifawsODaR4BeakiKmnR5xz1Fg8sFY84mCh8RHfhz6W2sECxbpY9Vzoy 6rqNvKNXMEahvKYASZOGZO7fJrcuiTyHvkwDR+h4DhxDjkaLYcw4UrNMbxK/XEFYWO DNCXSW4Y/CX6DNuNdZnrvQZnQBpCLONGbLRRgdUg= X-Riseup-User-ID: 71A3002FE9AA57555A6479D41E0659D74EA13E83245BBAF331A4CB3FBC896A76 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews2.riseup.net (Postfix) with ESMTPSA id 4LkHhd5JxCz214c; Thu, 14 Jul 2022 14:59:45 +0000 (UTC) From: raingloom Date: Thu, 14 Jul 2022 16:58:51 +0200 Message-Id: <20220714145851.20305-1-raingloom@riseup.net> MIME-Version: 1.0 Received-SPF: pass client-ip=198.252.153.129; envelope-from=raingloom@riseup.net; helo=mx1.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * build-aux/compile-all (%): Simpler calculation that avoids intermediate float. --- build-aux/compile-all.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-aux/compile-all.scm b/build-aux/compile-all.scm index 9ffbce43ad..6fdbe0dea8 100644 --- a/build-aux/compile-all.scm +++ b/build-aux/compile-all.scm @@ -89,7 +89,7 @@ (define (parallel-job-count*) (define (% completed total) "Return the completion percentage of COMPLETED over TOTAL as an integer." - (inexact->exact (round (* 100. (/ completed total))))) + (quotient (* 100 completed) total)) ;; Install a SIGINT handler to give unwind handlers in 'compile-file' an ;; opportunity to run upon SIGINT and to remove temporary output files.