From: Efraim Flashner <efraim@flashner.co.il>
To: 41105@debbugs.gnu.org
Cc: Efraim Flashner <efraim@flashner.co.il>
Subject: [bug#41105] [PATCH] build: minify-build-system: Fail to install empty files.
Date: Wed, 6 May 2020 11:39:23 +0300 [thread overview]
Message-ID: <20200506083923.14385-1-efraim@flashner.co.il> (raw)
* 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
next reply other threads:[~2020-05-06 8:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 8:39 Efraim Flashner [this message]
2020-05-18 6:54 ` bug#41105: minify-build-system: Fail to install empty files Efraim Flashner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200506083923.14385-1-efraim@flashner.co.il \
--to=efraim@flashner.co.il \
--cc=41105@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.