missing macro with length <=2 is not an error

This commit is contained in:
Дмитрий Левин 2005-10-13 10:59:05 +00:00
parent 53b2430a32
commit 41dcd7cb5f

View File

@ -1462,13 +1462,13 @@ expandMacro(MacroBuf mb)
SAVECHAR(mb, c); SAVECHAR(mb, c);
if (current_rpmBuiltinMacroLookup && if (current_rpmBuiltinMacroLookup &&
!current_rpmBuiltinMacroLookup(f, fn)) { !current_rpmBuiltinMacroLookup(f, fn)) {
if (current_rpmBuiltinMacroLookupFailedOK) if (current_rpmBuiltinMacroLookupFailedOK || fn <= 2)
rpmError(_wm(118), rpmError(_wm(118),
_("Macro %%%.*s not found\n"), fn, f); _("Macro %%%.*s not found\n"), fn, f);
else { else {
rpmError(RPMERR_BADSPEC, rpmError(RPMERR_BADSPEC,
_("Macro %%%.*s not found\n"), fn, f); _("Macro %%%.*s not found\n"), fn, f);
rc2 = 1; rc2 = 1;
} }
} }
continue; continue;