From unknown Thu Sep 11 02:24:52 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#41105 <41105@debbugs.gnu.org> To: bug#41105 <41105@debbugs.gnu.org> Subject: Status: [PATCH] build: minify-build-system: Fail to install empty files. Reply-To: bug#41105 <41105@debbugs.gnu.org> Date: Thu, 11 Sep 2025 09:24:52 +0000 retitle 41105 [PATCH] build: minify-build-system: Fail to install empty fil= es. reassign 41105 guix-patches submitter 41105 Efraim Flashner severity 41105 normal tag 41105 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 04:40:37 2020 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 To: guix-patches@gnu.org Subject: [PATCH] build: minify-build-system: Fail to install empty files. 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-Debbugs-Envelope-To: submit Cc: Efraim Flashner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * 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 From debbugs-submit-bounces@debbugs.gnu.org Mon May 18 02:54:49 2020 Received: (at 41105-done) by debbugs.gnu.org; 18 May 2020 06:54:49 +0000 Received: from localhost ([127.0.0.1]:45653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaZfl-0006lh-DG for submit@debbugs.gnu.org; Mon, 18 May 2020 02:54:49 -0400 Received: from flashner.co.il ([178.62.234.194]:34642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaZfj-0006lS-Pf for 41105-done@debbugs.gnu.org; Mon, 18 May 2020 02:54:48 -0400 Received: from localhost (unknown [188.120.128.132]) by flashner.co.il (Postfix) with ESMTPSA id 1C603400E5 for <41105-done@debbugs.gnu.org>; Mon, 18 May 2020 06:54:40 +0000 (UTC) Date: Mon, 18 May 2020 09:54:06 +0300 From: Efraim Flashner To: 41105-done@debbugs.gnu.org Subject: minify-build-system: Fail to install empty files Message-ID: <20200518065406.GC18220@E5400> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2JFBq9zoW8cOFH7v" Content-Disposition: inline X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 41105-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --2JFBq9zoW8cOFH7v Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Patch pushed. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --2JFBq9zoW8cOFH7v Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl7CMQ0ACgkQQarn3Mo9 g1E+aw/7BwK5scJJh+4BDDaEjQMXqiZVHriolyUkrpgxpuuH7HHHwraPl6WYNDsI +fp9lQ8J3P8ghPwHdauAnmW/BdvpCowG9QPl8qZBJ/th4h4DYvuly32HWqmFILZB F2qGAxzauYPOEY9pwbdjPj9dQMyz4RYCPLV1VOCptSbwlwrn8YpV510V1ubZG4rW 9+CEbyNZ4lVSw3zt1Rqyf/26r1VJ5eGbLYScKLbgdWI1laQJNOlt5DaF6zsMSFV+ NGUx+TmMh6iT+lHQ5Y4ZemWJkqvcGaKFX8icYAws3fT/WBzkFbj3vP/0obtHIuKC dE+ex9NJUhHHcCe/tCRagyP5ot8HB328WdKPuhyrX9vT3Jfo5bkY+RBmlIRHR6Iy 7x9gjztxeVEwtjIEU6vknXHEnEsk/HJrYcmARzXzW6hYz62dUm9b/r4cYjrWlZ5O aw0OYo2QNoOW16P6mjIr0qeOQupKbDIOhMgIsIURyNMnTq6s8VCne7o+OSGtYYZF OuQg8RlCpyTC3i1ZQ63hZ2I3c+e//FF0dfNNV47HoAvFai2cano2lN6WFtPkVfeR MoomyKKit7HrabZqiQavNeHIRhguUpS9oV/knu1iEFDEOWwWx2YRXXSvmxieGJhl oxrLlU4tPModmZ6wvmFKtcIPOkp7nwk8lAosA4Aa4/4g6Jhwl8k= =aM51 -----END PGP SIGNATURE----- --2JFBq9zoW8cOFH7v-- From unknown Thu Sep 11 02:24:52 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 15 Jun 2020 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator