Fixed rpmBuiltinMacroLookup support
This commit is contained in:
parent
fe9e970228
commit
d04814401c
@ -616,35 +616,35 @@ fprintf(stderr, "*** PS buildRootURL(%s) %p macro set to %s\n", spec->buildRootU
|
||||
|
||||
/*@-infloops@*/ /* LCL: parsePart is modified @*/
|
||||
while (parsePart < PART_LAST && parsePart != PART_NONE) {
|
||||
rpmBuiltinMacroLookup saved_lookup = NULL;
|
||||
rpmBuiltinMacroLookup saved_lookup = rpmSetBuiltinMacroLookup(NULL);
|
||||
int skip_lookup = rpmExpandNumeric("%{?_allow_undefined_macros}");
|
||||
switch (parsePart) {
|
||||
case PART_PREAMBLE:
|
||||
if (!skip_lookup)
|
||||
saved_lookup = rpmSetBuiltinMacroLookup(is_builtin_preamble_tag);
|
||||
rpmSetBuiltinMacroLookup(is_builtin_preamble_tag);
|
||||
parsePart = parsePreamble(spec, initialPackage);
|
||||
initialPackage = 0;
|
||||
/*@switchbreak@*/ break;
|
||||
case PART_PREP:
|
||||
if (!skip_lookup)
|
||||
saved_lookup = rpmSetBuiltinMacroLookup(is_builtin_prep_tag);
|
||||
rpmSetBuiltinMacroLookup(is_builtin_prep_tag);
|
||||
parsePart = parsePrep(spec);
|
||||
/*@switchbreak@*/ break;
|
||||
case PART_BUILD:
|
||||
case PART_INSTALL:
|
||||
case PART_CLEAN:
|
||||
if (!skip_lookup)
|
||||
saved_lookup = rpmSetBuiltinMacroLookup(is_builtin_build_tag);
|
||||
rpmSetBuiltinMacroLookup(is_builtin_build_tag);
|
||||
parsePart = parseBuildInstallClean(spec, parsePart);
|
||||
/*@switchbreak@*/ break;
|
||||
case PART_CHANGELOG:
|
||||
if (!skip_lookup)
|
||||
saved_lookup = rpmSetBuiltinMacroLookup(NULL);
|
||||
rpmSetBuiltinMacroLookup(NULL);
|
||||
parsePart = parseChangelog(spec);
|
||||
/*@switchbreak@*/ break;
|
||||
case PART_DESCRIPTION:
|
||||
if (!skip_lookup)
|
||||
saved_lookup = rpmSetBuiltinMacroLookup(is_builtin_description_tag);
|
||||
rpmSetBuiltinMacroLookup(is_builtin_description_tag);
|
||||
parsePart = parseDescription(spec);
|
||||
/*@switchbreak@*/ break;
|
||||
|
||||
@ -657,13 +657,13 @@ fprintf(stderr, "*** PS buildRootURL(%s) %p macro set to %s\n", spec->buildRootU
|
||||
case PART_TRIGGERUN:
|
||||
case PART_TRIGGERPOSTUN:
|
||||
if (!skip_lookup)
|
||||
saved_lookup = rpmSetBuiltinMacroLookup(is_builtin_script_tag);
|
||||
rpmSetBuiltinMacroLookup(is_builtin_script_tag);
|
||||
parsePart = parseScript(spec, parsePart);
|
||||
/*@switchbreak@*/ break;
|
||||
|
||||
case PART_FILES:
|
||||
if (!skip_lookup)
|
||||
saved_lookup = rpmSetBuiltinMacroLookup(is_builtin_files_tag);
|
||||
rpmSetBuiltinMacroLookup(is_builtin_files_tag);
|
||||
parsePart = parseFiles(spec);
|
||||
/*@switchbreak@*/ break;
|
||||
|
||||
@ -672,7 +672,7 @@ fprintf(stderr, "*** PS buildRootURL(%s) %p macro set to %s\n", spec->buildRootU
|
||||
case PART_BUILDARCHITECTURES:
|
||||
/*@switchbreak@*/ break;
|
||||
}
|
||||
if (saved_lookup) rpmSetBuiltinMacroLookup(saved_lookup);
|
||||
rpmSetBuiltinMacroLookup(saved_lookup);
|
||||
|
||||
if (parsePart >= PART_LAST) {
|
||||
spec = freeSpec(spec);
|
||||
|
Loading…
Reference in New Issue
Block a user