[libvirt] [jenkins-ci PATCH] guests: Only attempt to fix intltool-update if it exists

Andrea Bolognani abologna at redhat.com
Fri Apr 13 16:52:20 UTC 2018


If we're running against a freshly-provisioned FreeBSD guest,
intltool won't have been installed yet and attempts to fix it
will fail. Make sure the file exists.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 guests/tasks/kludges.yml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/guests/tasks/kludges.yml b/guests/tasks/kludges.yml
index 4dd06a4..0ad61a7 100644
--- a/guests/tasks/kludges.yml
+++ b/guests/tasks/kludges.yml
@@ -52,6 +52,13 @@
 # wait for the port to be fixed, we can patch things up ourselves.
 #
 # See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227444
+- name: Look for intltool-update
+  stat:
+    path: /usr/local/bin/intltool-update
+  register: intltoolupdate
+  when:
+    - os_name == 'FreeBSD'
+
 - name: Fix intltool-update
   replace:
     path: /usr/local/bin/intltool-update
@@ -59,3 +66,4 @@
     replace: '\1 !~ /\\$\\{?$2}?/;'
   when:
     - os_name == 'FreeBSD'
+    - intltoolupdate.stat.exists
-- 
2.14.3




More information about the libvir-list mailing list