teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0689-meson-avoid-bogus-meson-warning.patch

be0c12
From 4433c31a80c4477b0a0c503c74e8faebc44f4453 Mon Sep 17 00:00:00 2001
be0c12
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
be0c12
Date: Thu, 7 Nov 2019 11:32:26 +0100
be0c12
Subject: [PATCH] meson: avoid bogus meson warning
be0c12
be0c12
With meson-0.52.0-1.module_f31+6771+f5d842eb.noarch I get:
be0c12
src/test/meson.build:19: WARNING: Overriding previous value of environment variable 'PATH' with a new one
be0c12
be0c12
When we're using *prepend*, the whole point is to modify an existing variable,
be0c12
so meson shouldn't warn. But let's set avoid the warning and shorten things by
be0c12
setting the final value immediately.
be0c12
be0c12
(cherry picked from commit cbe804947482998cc767bfb0c169e6263a6ef097)
be0c12
---
be0c12
 src/test/meson.build | 5 ++---
be0c12
 1 file changed, 2 insertions(+), 3 deletions(-)
be0c12
be0c12
diff --git a/src/test/meson.build b/src/test/meson.build
be0c12
index 40cf56d73d..6eaa62e53f 100644
be0c12
--- a/src/test/meson.build
be0c12
+++ b/src/test/meson.build
be0c12
@@ -10,12 +10,11 @@ test_hashmap_ordered_c = custom_target(
be0c12
 
be0c12
 test_include_dir = include_directories('.')
be0c12
 
be0c12
-path = run_command('sh', ['-c', 'echo "$PATH"']).stdout()
be0c12
+path = run_command('sh', ['-c', 'echo "$PATH"']).stdout().strip()
be0c12
 test_env = environment()
be0c12
 test_env.set('SYSTEMD_KBD_MODEL_MAP', kbd_model_map)
be0c12
 test_env.set('SYSTEMD_LANGUAGE_FALLBACK_MAP', language_fallback_map)
be0c12
-test_env.set('PATH', path)
be0c12
-test_env.prepend('PATH', meson.build_root())
be0c12
+test_env.set('PATH', '@0@:@1@'.format(meson.build_root(), path))
be0c12
 
be0c12
 ############################################################
be0c12