dryang / rpms / systemd

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