* [bug#41105] [PATCH] build: minify-build-system: Fail to install empty files.
@ 2020-05-06 8:39 Efraim Flashner
2020-05-18 6:54 ` bug#41105: " Efraim Flashner
0 siblings, 1 reply; 2+ messages in thread
From: Efraim Flashner @ 2020-05-06 8:39 UTC (permalink / raw)
To: 41105; +Cc: Efraim Flashner
* 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 <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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#41105: minify-build-system: Fail to install empty files
2020-05-06 8:39 [bug#41105] [PATCH] build: minify-build-system: Fail to install empty files Efraim Flashner
@ 2020-05-18 6:54 ` Efraim Flashner
0 siblings, 0 replies; 2+ messages in thread
From: Efraim Flashner @ 2020-05-18 6:54 UTC (permalink / raw)
To: 41105-done
[-- Attachment #1: Type: text/plain, Size: 228 bytes --]
Patch pushed.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-18 6:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-06 8:39 [bug#41105] [PATCH] build: minify-build-system: Fail to install empty files Efraim Flashner
2020-05-18 6:54 ` bug#41105: " Efraim Flashner
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).