From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wCANAxp4sl74aAAA0tVLHw (envelope-from ) for ; Wed, 06 May 2020 08:40:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id cGzJLCV4sl5mSAAA1q6Kng (envelope-from ) for ; Wed, 06 May 2020 08:41:09 +0000 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 89C8E940CFB for ; Wed, 6 May 2020 08:41:07 +0000 (UTC) Received: from localhost ([::1]:46390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWFc3-0002Q7-SU for larch@yhetil.org; Wed, 06 May 2020 04:41:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWFby-0002Pt-IN for guix-patches@gnu.org; Wed, 06 May 2020 04:41:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55159) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWFby-0008AI-9U for guix-patches@gnu.org; Wed, 06 May 2020 04:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jWFby-0003ny-6t for guix-patches@gnu.org; Wed, 06 May 2020 04:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41105] [PATCH] build: minify-build-system: Fail to install empty files. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 May 2020 08:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41105 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41105@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158875443714575 (code B ref -1); Wed, 06 May 2020 08:41:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 May 2020 08:40:37 +0000 Received: from localhost ([127.0.0.1]:38472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWFbZ-0003n1-Gr for submit@debbugs.gnu.org; Wed, 06 May 2020 04:40:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:51638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWFbX-0003mt-Vi for submit@debbugs.gnu.org; Wed, 06 May 2020 04:40:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWFbX-0002MC-OP for guix-patches@gnu.org; Wed, 06 May 2020 04:40:35 -0400 Received: from flashner.co.il ([178.62.234.194]:56992) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWFbW-0006y0-JZ for guix-patches@gnu.org; Wed, 06 May 2020 04:40:35 -0400 Received: from localhost (unknown [188.120.128.132]) by flashner.co.il (Postfix) with ESMTPSA id 6699840212; Wed, 6 May 2020 08:40:01 +0000 (UTC) From: Efraim Flashner Date: Wed, 6 May 2020 11:39:23 +0300 Message-Id: <20200506083923.14385-1-efraim@flashner.co.il> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/06 04:40:01 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 X-Spam-Score: 3.29 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Scan-Result: default: False [3.29 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.49635615558619]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip6:2001:470:142::/48:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.12), country: US(-0.00), ip: 2001:470:142::17(-0.50)]; DWL_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; RCPT_COUNT_TWO(0.00)[2]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[188.120.128.132:received]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:22989, ipnet:2001:470:142::/48, country:US]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(3.00)[188.120.128.132:received]; FROM_NEQ_ENVFROM(0.00)[efraim@flashner.co.il,guix-patches-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[elephly.net:email,flashner.co.il:email]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[flashner.co.il]; HAS_LIST_UNSUB(-0.01)[]; DNSWL_BLOCKED(0.00)[2001:470:142::17:from]; BAD_REP_POLICIES(0.10)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_SEVEN(0.00)[10]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: dZWRwE4GtMQc * guix/build/minify-build-system.scm (install): Produce an error if the minified file is zero bytes. --- I'm pretty sure this can go directly into master. 'guix refresh -l uglify-js' shows 93 packages. 'guix refresh -l r-shiny' shows 71 packages. The 4 differing packages are hpcguix-web, calibre, mate and snap. My only real concern is that r-shiny is calling minify directly and so we might want it to error during the 'build phase and not during the 'install phase. --- guix/build/minify-build-system.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/guix/build/minify-build-system.scm b/guix/build/minify-build-system.scm index 563def88e9..92158a033f 100644 --- a/guix/build/minify-build-system.scm +++ b/guix/build/minify-build-system.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Ricardo Wurmus +;;; Copyright © 2020 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -54,8 +55,12 @@ (let* ((out (assoc-ref outputs "out")) (js (string-append out "/share/javascript/"))) (mkdir-p js) - (for-each (cut install-file <> js) - (find-files "guix/build" "\\.min\\.js$"))) + (for-each + (lambda (file) + (if (not (zero? (stat:size (stat file)))) + (install-file file js) + (error "File is empty: " file))) + (find-files "guix/build" "\\.min\\.js$"))) #t) (define %standard-phases -- 2.26.2