aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/ansible-wrap-program-hack.patch
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2017-06-29 18:02:17 -0400
committerLeo Famulari <leo@famulari.name>2017-06-29 18:02:17 -0400
commit1024c8119c71ba3ec0122238e8d8254b08d29187 (patch)
treead12a1aac7f828791154a1786d4f245db71b46e9 /gnu/packages/patches/ansible-wrap-program-hack.patch
parent92cb946bd9d78cb8f6aa8418d505f52da6894ab4 (diff)
parent95bbaa02aa63bc5eae36f686f1ed9915663aa4cf (diff)
downloadguix-1024c8119c71ba3ec0122238e8d8254b08d29187.tar
guix-1024c8119c71ba3ec0122238e8d8254b08d29187.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/ansible-wrap-program-hack.patch')
-rw-r--r--gnu/packages/patches/ansible-wrap-program-hack.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/gnu/packages/patches/ansible-wrap-program-hack.patch b/gnu/packages/patches/ansible-wrap-program-hack.patch
new file mode 100644
index 0000000000..c2e1028392
--- /dev/null
+++ b/gnu/packages/patches/ansible-wrap-program-hack.patch
@@ -0,0 +1,22 @@
+Ansible changes its behaviour depending on the name of the script that it is
+called as. Make it deal with guix' .real wrapper scripts.
+
+FIXME: Remove once wrapping ansible works properly.
+See http://lists.gnu.org/archive/html/bug-guix/2017-05/msg00015.html.
+--- ansible-2.3.0.0/bin/ansible 2017-04-12 16:08:05.000000000 +0200
++++ ansible-2.3.0.0-fixed/bin/ansible 2017-05-21 20:11:18.720872385 +0200
+@@ -75,7 +75,13 @@
+ # sometimes add that
+ target = target[:-1]
+
+- if len(target) > 1:
++ if target[-1] == "real" and target[0].startswith('.'):
++ target = target[:-1]
++ target[0] = target[0][1:]
++ if len(target) > 1 and target[1] != "real" :
++ sub = target[1]
++ myclass = "%sCLI" % sub.capitalize()
++ elif len(target) > 2 and target[2] == "real" :
+ sub = target[1]
+ myclass = "%sCLI" % sub.capitalize()
+ elif target[0] == 'ansible':