[bug#43367,1/5] utils: wrap-program: Refuse to wrap .X-real files.
diff mbox series

Message ID 20200913054557.12911-1-mail@brendan.scot
State New
Headers show
Series
  • [bug#43367,1/5] utils: wrap-program: Refuse to wrap .X-real files.
Related show

Commit Message

Brendan Tildesley Sept. 13, 2020, 5:45 a.m. UTC
*    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'
---
 guix/build/utils.scm | 3 +++
 1 file changed, 3 insertions(+)

Patch
diff mbox series

diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index e872cfffd3..822191f4de 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -1194,6 +1194,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