teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0660-meson-do-not-fail-if-rsync-is-not-installed-with-mes.patch

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