teknoraver / rpms / systemd

Forked from rpms/systemd a month ago
Clone

Blame SOURCES/0061-meson-Use-echo-to-list-files.patch

594167
From 5de4b00e4150080e68064fa1de003039a0901468 Mon Sep 17 00:00:00 2001
594167
From: Jan Janssen <medhefgo@web.de>
594167
Date: Tue, 11 Jan 2022 11:27:27 +0100
594167
Subject: [PATCH] meson: Use echo to list files
594167
594167
No need to invoke ls when we are just interested in file names.
594167
Also, the cd to source root makes the output identical to
594167
"git ls-files" (relative instead of absolute paths).
594167
594167
(cherry picked from commit 3a469802f4d7b0a59fe1644cb53d34aee4e56bab)
594167
594167
Related: #2017035
594167
---
594167
 test/fuzz/meson.build | 2 +-
594167
 test/meson.build      | 2 +-
594167
 2 files changed, 2 insertions(+), 2 deletions(-)
594167
594167
diff --git a/test/fuzz/meson.build b/test/fuzz/meson.build
594167
index b4766de3eb..39730a615c 100644
594167
--- a/test/fuzz/meson.build
594167
+++ b/test/fuzz/meson.build
594167
@@ -19,7 +19,7 @@ if git.found() and fs.exists(project_source_root / '.git')
594167
                           'ls-files', ':/test/fuzz/*/*',
594167
                           check: true)
594167
 else
594167
-        out = run_command(sh, '-c', 'ls @0@/test/fuzz/*/*'.format(project_source_root), check: true)
594167
+        out = run_command(sh, '-c', 'cd "@0@"; echo test/fuzz/*/*'.format(project_source_root), check: true)
594167
 endif
594167
 
594167
 fuzz_regression_tests = []
594167
diff --git a/test/meson.build b/test/meson.build
594167
index baf94703ea..c5d8d6917b 100644
594167
--- a/test/meson.build
594167
+++ b/test/meson.build
594167
@@ -190,7 +190,7 @@ if want_tests != 'false' and dmi_arches.contains(host_machine.cpu_family())
594167
                         check: true)
594167
         else
594167
                 out = run_command(
594167
-                        sh, '-c', 'ls @0@/test/dmidecode-dumps/*.bin'.format(project_source_root),
594167
+                        sh, '-c', 'cd "@0@"; echo test/dmidecode-dumps/*.bin'.format(project_source_root),
594167
                         check: true)
594167
         endif
594167