guix-commits
[Top][All Lists]
Advanced

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

01/02: gnu: ansible: Work around issues with Guix wrapper scripts.


From: guix-commits
Subject: 01/02: gnu: ansible: Work around issues with Guix wrapper scripts.
Date: Tue, 15 Oct 2019 16:32:07 -0400 (EDT)

arunisaac pushed a commit to branch master
in repository guix.

commit ba8551ec79471ac402e6211d16e617bcb13e8d97
Author: Arun Isaac <address@hidden>
Date:   Wed Oct 16 01:29:10 2019 +0530

    gnu: ansible: Work around issues with Guix wrapper scripts.
    
    * gnu/packages/admin.scm (ansible)[arguments]: Remove fix-symlinks phase. 
Add
    replace-symlinks phase.
---
 gnu/packages/admin.scm | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 35dae2d..0e4fb39 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -19,7 +19,7 @@
 ;;; Copyright © 2017 Ethan R. Jones <address@hidden>
 ;;; Copyright © 2017 Christopher Allan Webber <address@hidden>
 ;;; Copyright © 2017, 2018 Marius Bakke <address@hidden>
-;;; Copyright © 2018 Arun Isaac <address@hidden>
+;;; Copyright © 2018, 2019 Arun Isaac <address@hidden>
 ;;; Copyright © 2018 Pierre-Antoine Rouby <address@hidden>
 ;;; Copyright © 2018 Rutger Helling <address@hidden>
 ;;; Copyright © 2018 Pierre Neidhardt <address@hidden>
@@ -1880,21 +1880,16 @@ import re
 sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
 ")))
              #t))
-         (add-after 'wrap 'fix-symlinks
+         (add-after 'install 'replace-symlinks
            (lambda* (#:key outputs #:allow-other-keys)
+             ;; Replace symlinks with duplicate copies of the ansible
+             ;; executable.
              (let ((out (assoc-ref outputs "out")))
                (for-each
                 (lambda (subprogram)
-                  ;; The symlinks point to the ansible wrapper script. Make
-                  ;; them point to the real executable (.ansible-real).
-                  (delete-file (string-append out "/bin/.ansible-" subprogram 
"-real"))
-                  (symlink (string-append out "/bin/.ansible-real")
-                           (string-append out "/bin/.ansible-" subprogram 
"-real"))
-                  ;; The wrapper scripts of the symlinks invoke the ansible
-                  ;; wrapper script. Fix them to invoke the correct executable.
-                  (substitute* (string-append out "/bin/ansible-" subprogram)
-                    (("/bin/ansible")
-                     (string-append "/bin/.ansible-" subprogram "-real"))))
+                  (delete-file (string-append out "/bin/ansible-" subprogram))
+                  (copy-file (string-append out "/bin/ansible")
+                             (string-append out "/bin/ansible-" subprogram)))
                 (list "config" "console" "doc" "galaxy"
                       "inventory" "playbook" "pull" "vault")))
              #t)))))



reply via email to

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