From 314daae243197f43104687cc35165ad0ce9c8c99 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Thu, 11 Oct 2018 15:10:03 -0400 Subject: [PATCH] Avoid 'unexpanded macro' warning in mock srpm builds When preparing the srpm in mock or other minimal environments, the use of %{_emacs_version} causes a spurious warning: Possible unexpanded macro in: Requires: emacs-filesystem >= %{_emacs_version} Prevent the warning with a check that the macro is defined before use. (There is another use of %{_emacs_version}, but it only applies to EL-6 where the warning is not present. Just ignore it.) --- git.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git.spec b/git.spec index 24ab398..21f0ce6 100644 --- a/git.spec +++ b/git.spec @@ -221,7 +221,7 @@ Requires: perl(Term::ReadKey) %endif # ! defined perl_bootstrap Requires: perl-Git = %{version}-%{release} -%if %{emacs_filesystem} +%if %{emacs_filesystem} && %{defined _emacs_version} Requires: emacs-filesystem >= %{_emacs_version} %endif # emacs_filesystem