guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

07/07: utils: wrap-program: Refuse to wrap .X-real files.


From: guix-commits
Subject: 07/07: utils: wrap-program: Refuse to wrap .X-real files.
Date: Thu, 22 Apr 2021 08:05:01 -0400 (EDT)

civodul pushed a commit to branch core-updates
in repository guix.

commit a738a663a99ea63078cbba63d9b267e123f475d5
Author: Brendan Tildesley <mail@brendan.scot>
AuthorDate: Sun Sep 13 15:45:53 2020 +1000

    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>
---
 guix/build/utils.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index a15beac..dbfc0a9 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]