mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: ansible: Apply experimental patch to deal with wrapping of ansible script.
See <http://lists.gnu.org/archive/html/bug-guix/2017-05/msg00015.html> for the rationale. * gnu/packages/patches/ansible-wrap-program-hack.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/admin.scm (ansible)[source]: Use it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
aafcfffd93
commit
b786661309
3 changed files with 25 additions and 1 deletions
22
gnu/packages/patches/ansible-wrap-program-hack.patch
Normal file
22
gnu/packages/patches/ansible-wrap-program-hack.patch
Normal file
|
@ -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':
|
Loading…
Add table
Add a link
Reference in a new issue