dryang / rpms / systemd

Forked from rpms/systemd a year ago
Clone
eb17d3
From 112de8e094470d2a8df4f7c9b8ca62bd68c96a70 Mon Sep 17 00:00:00 2001
eb17d3
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
eb17d3
Date: Mon, 12 Apr 2021 14:03:32 +0200
eb17d3
Subject: [PATCH] meson: do not fail if rsync is not installed with meson
eb17d3
 0.57.2
eb17d3
eb17d3
https://github.com/mesonbuild/meson/issues/8641
eb17d3
eb17d3
Our CI started to fail. Even if the change is reverted in meson,
eb17d3
we need a quick workaround here.
eb17d3
eb17d3
(cherry picked from commit 7c5fd25119a495009ea62f79e5daec34cc464628)
eb17d3
eb17d3
Related: #2030027
eb17d3
---
eb17d3
 man/meson.build | 25 ++++++++++++++-----------
eb17d3
 1 file changed, 14 insertions(+), 11 deletions(-)
eb17d3
eb17d3
diff --git a/man/meson.build b/man/meson.build
eb17d3
index a953d34098..efc8836d0c 100644
eb17d3
--- a/man/meson.build
eb17d3
+++ b/man/meson.build
eb17d3
@@ -178,17 +178,20 @@ html = custom_target(
eb17d3
         depends : html_pages,
eb17d3
         command : ['echo'])
eb17d3
 
eb17d3
-run_target(
eb17d3
-        'doc-sync',
eb17d3
-        depends : man_pages + html_pages,
eb17d3
-        command : ['rsync', '-rlv',
eb17d3
-                   '--delete-excluded',
eb17d3
-                   '--include=man',
eb17d3
-                   '--include=*.html',
eb17d3
-                   '--exclude=*',
eb17d3
-                   '--omit-dir-times',
eb17d3
-                   meson.current_build_dir(),
eb17d3
-                   get_option('www-target')])
eb17d3
+rsync = find_program('rsync', required : false)
eb17d3
+if rsync.found()
eb17d3
+        run_target(
eb17d3
+                'doc-sync',
eb17d3
+                depends : man_pages + html_pages,
eb17d3
+                command : [rsync, '-rlv',
eb17d3
+                           '--delete-excluded',
eb17d3
+                           '--include=man',
eb17d3
+                           '--include=*.html',
eb17d3
+                           '--exclude=*',
eb17d3
+                           '--omit-dir-times',
eb17d3
+                           meson.current_build_dir(),
eb17d3
+                           get_option('www-target')])
eb17d3
+endif
eb17d3
 
eb17d3
 ############################################################
eb17d3