naccyde / rpms / systemd

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