[PATCH] build: minify-build-system: Fail to install empty files.

DoneSubmitted by Efraim Flashner.
Details
One participant
  • Efraim Flashner
Owner
unassigned
Severity
normal
E
E
Efraim Flashner wrote on 6 May 10:39 +0200
(address . guix-patches@gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
20200506083923.14385-1-efraim@flashner.co.il
* guix/build/minify-build-system.scm (install): Produce an error if theminified file is zero bytes.---
I'm pretty sure this can go directly into master. 'guix refresh -luglify-js' shows 93 packages. 'guix refresh -l r-shiny' shows 71packages. The 4 differing packages are hpcguix-web, calibre, mate andsnap.
My only real concern is that r-shiny is calling minify directly and sowe 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(-)
Toggle diff (28 lines)diff --git a/guix/build/minify-build-system.scm b/guix/build/minify-build-system.scmindex 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 <rekado@elephly.net>+;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> ;;; ;;; 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
E
E
Efraim Flashner wrote on 18 May 08:54 +0200
minify-build-system: Fail to install empty files
(address . 41105-done@debbugs.gnu.org)
20200518065406.GC18220@E5400
Patch pushed.
-- Efraim Flashner <efraim@flashner.co.il> אפרים פלשנרGPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl7CMQ0ACgkQQarn3Mo9g1E+aw/7BwK5scJJh+4BDDaEjQMXqiZVHriolyUkrpgxpuuH7HHHwraPl6WYNDsI+fp9lQ8J3P8ghPwHdauAnmW/BdvpCowG9QPl8qZBJ/th4h4DYvuly32HWqmFILZBF2qGAxzauYPOEY9pwbdjPj9dQMyz4RYCPLV1VOCptSbwlwrn8YpV510V1ubZG4rW9+CEbyNZ4lVSw3zt1Rqyf/26r1VJ5eGbLYScKLbgdWI1laQJNOlt5DaF6zsMSFV+NGUx+TmMh6iT+lHQ5Y4ZemWJkqvcGaKFX8icYAws3fT/WBzkFbj3vP/0obtHIuKCdE+ex9NJUhHHcCe/tCRagyP5ot8HB328WdKPuhyrX9vT3Jfo5bkY+RBmlIRHR6Iy7x9gjztxeVEwtjIEU6vknXHEnEsk/HJrYcmARzXzW6hYz62dUm9b/r4cYjrWlZ5Oaw0OYo2QNoOW16P6mjIr0qeOQupKbDIOhMgIsIURyNMnTq6s8VCne7o+OSGtYYZFOuQg8RlCpyTC3i1ZQ63hZ2I3c+e//FF0dfNNV47HoAvFai2cano2lN6WFtPkVfeRMoomyKKit7HrabZqiQavNeHIRhguUpS9oV/knu1iEFDEOWwWx2YRXXSvmxieGJhloxrLlU4tPModmZ6wvmFKtcIPOkp7nwk8lAosA4Aa4/4g6Jhwl8k==aM51-----END PGP SIGNATURE-----

Closed
?