aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendan Tildesley <mail@brendan.scot>2020-09-13 15:45:53 +1000
committerLudovic Courtès <ludo@gnu.org>2021-04-22 14:04:28 +0200
commita738a663a99ea63078cbba63d9b267e123f475d5 (patch)
tree9a882803c2004b20085382581d8422a039cd5352
parentc90a509dd9b12dc94804161bbe88f401df1dad76 (diff)
downloadguix-a738a663a99ea63078cbba63d9b267e123f475d5.tar.gz
guix-a738a663a99ea63078cbba63d9b267e123f475d5.zip
utils: wrap-program: Refuse to wrap .X-real files.
* guix/build/utils.scm (wrap-program): Error if wrap-program was mistakenly passed a .X-real file. This prevents and forces us to fix cases where a double wrapped ..X-real-real file is created, such as can be seen with: "find /gnu/ -iname '.*-real-real'". Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--guix/build/utils.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index a15beac114..dbfc0a9142 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -1303,6 +1303,9 @@ with definitions for VARS."
(format #f "export ~a=\"$~a${~a:+:}~a\""
var var var (string-join rest ":")))))
+ (when (wrapped-program? prog)
+ (error (string-append prog " is a wrapper. Refusing to wrap.")))
+
(if already-wrapped?
;; PROG is already a wrapper: add the new "export VAR=VALUE" lines just