[packages/rpm-build-tools] do not remove macros.build from macrofiles for parsing spec

baggins baggins at pld-linux.org
Tue Oct 29 01:38:29 CET 2013


commit 202b825e4bf39de168b9939434900024e14841d9
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Oct 29 01:36:41 2013 +0100

    do not remove macros.build from macrofiles for parsing spec
    
    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 | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/builder.sh b/builder.sh
index 35b7f0f..47336ad 100755
--- a/builder.sh
+++ b/builder.sh
@@ -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'
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/202b825e4bf39de168b9939434900024e14841d9



More information about the pld-cvs-commit mailing list