]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
do not remove macros.build from macrofiles for parsing spec AC-branch auto/ac/rpm-build-tools-4.5-12
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 29 Oct 2013 00:36:41 +0000 (01:36 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 29 Oct 2013 00:36:41 +0000 (01:36 +0100)
If macros from macros.build are used before %prep then removing
them from list will cause severe, mysterious breakage. Like
'parse error in expression' during macro evaulation.

builder.sh

index 35b7f0fd48d5ac8945011ac832cf35828c3484fd..47336ade958309dfe16f30f055d6195796575875 100755 (executable)
@@ -581,10 +581,7 @@ set_spec_target() {
 
 # runs rpm with minimal macroset
 minirpm() {
-       # we reset macros not to contain macros.build as all the %() macros are
-       # executed here, while none of them are actually needed.
-       # at the time of this writing macros.build + macros contained 70 "%(...)" macros.
-       safe_macrofiles=$(rpm $TARGET_SWITCH --showrc | awk -F: '/^macrofiles/ { gsub(/^macrofiles[ \t]+:/, "", $0); gsub(/:.*macros.build:/, ":", $0); print $0 } ')
+       safe_macrofiles=$(rpm $TARGET_SWITCH --showrc | awk -F: '/^macrofiles/ { gsub(/^macrofiles[ \t]+:/, "", $0); print $0 } ')
 
        # TODO: move these to /usr/lib/rpm/macros
        cat > $BUILDER_MACROS <<'EOF'
This page took 0.037439 seconds and 4 git commands to generate.