richardphibel / rpms / systemd

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