From 41dcd7cb5fef862020ffcd3f62f59847a6a8b465 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 13 Oct 2005 10:59:05 +0000 Subject: [PATCH] missing macro with length <=2 is not an error --- rpmio/macro.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rpmio/macro.c b/rpmio/macro.c index 221543f..ef5ae30 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -1462,13 +1462,13 @@ expandMacro(MacroBuf mb) SAVECHAR(mb, c); if (current_rpmBuiltinMacroLookup && !current_rpmBuiltinMacroLookup(f, fn)) { - if (current_rpmBuiltinMacroLookupFailedOK) - rpmError(_wm(118), - _("Macro %%%.*s not found\n"), fn, f); + if (current_rpmBuiltinMacroLookupFailedOK || fn <= 2) + rpmError(_wm(118), + _("Macro %%%.*s not found\n"), fn, f); else { - rpmError(RPMERR_BADSPEC, - _("Macro %%%.*s not found\n"), fn, f); - rc2 = 1; + rpmError(RPMERR_BADSPEC, + _("Macro %%%.*s not found\n"), fn, f); + rc2 = 1; } } continue;