me
/
guix
Archived
1
0
Fork 0

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>
master
Brendan Tildesley 2020-09-13 15:45:53 +10:00 committed by Ludovic Courtès
parent c90a509dd9
commit a738a663a9
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 3 additions and 0 deletions

View File

@ -1303,6 +1303,9 @@ with definitions for VARS."
(format #f "export ~a=\"$~a${~a:+:}~a\"" (format #f "export ~a=\"$~a${~a:+:}~a\""
var var var (string-join rest ":"))))) var var var (string-join rest ":")))))
(when (wrapped-program? prog)
(error (string-append prog " is a wrapper. Refusing to wrap.")))
(if already-wrapped? (if already-wrapped?
;; PROG is already a wrapper: add the new "export VAR=VALUE" lines just ;; PROG is already a wrapper: add the new "export VAR=VALUE" lines just