ryantimwilson / rpms / systemd

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