teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0642-rpm-emit-warning-when-macro-with-typo-is-used.patch

be0c12
From 4d994a262ec1ad3e33e197cb09aa5aeabb5835dd Mon Sep 17 00:00:00 2001
be0c12
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
be0c12
Date: Tue, 3 Jul 2018 15:40:53 +0200
be0c12
Subject: [PATCH] rpm: emit warning when macro with typo is used
be0c12
be0c12
Follow-up for a6bb550458. Suggested by @ignatenkobrain.
be0c12
be0c12
$ rpmbuild --eval %_environmentdir
be0c12
/usr/lib/environment.d
be0c12
$ rpmbuild --eval %_environmnentdir
be0c12
warning: Use %_environmentdir instead
be0c12
/usr/lib/environment.d
be0c12
be0c12
(cherry picked from commit be9bf171bbf764997551f8a9b3c2aba5c6a875d3)
be0c12
Related: #2018024
be0c12
---
be0c12
 src/core/macros.systemd.in | 2 +-
be0c12
 1 file changed, 1 insertion(+), 1 deletion(-)
be0c12
be0c12
diff --git a/src/core/macros.systemd.in b/src/core/macros.systemd.in
be0c12
index abbb42b22f..fe7ca26a34 100644
be0c12
--- a/src/core/macros.systemd.in
be0c12
+++ b/src/core/macros.systemd.in
be0c12
@@ -28,7 +28,7 @@
be0c12
 
be0c12
 # Because we had one release with a typo...
be0c12
 # This is temporary (Remove after systemd 240 is released)
be0c12
-%_environmnentdir %_environmentdir
be0c12
+%_environmnentdir %{warn:Use %%_environmentdir instead}%_environmentdir
be0c12
 
be0c12
 %systemd_requires \
be0c12
 Requires(post): systemd \