Author: glen                         Date: Tue Jan 17 23:56:33 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- define unknown macros and display errors when parsing spec

---- Files affected:
SPECS:
   builder (1.387 -> 1.388) 

---- Diffs:

================================================================
Index: SPECS/builder
diff -u SPECS/builder:1.387 SPECS/builder:1.388
--- SPECS/builder:1.387 Tue Jan 17 23:37:21 2006
+++ SPECS/builder       Wed Jan 18 00:56:28 2006
@@ -338,10 +338,17 @@
        # executed here, while none of them are actually needed
        # what we need from dump is NAME, VERSION, RELEASE and PATCHES/SOURCES.
        # macros.build + macros contained at the time of this writing 70 %() 
macros
-       local macrofiles='/usr/lib/rpm/macros:~/etc/.rpmmacros:~/.rpmmacros'
+       local 
macrofiles="/usr/lib/rpm/macros:$SPECS_DIR/.rpmmacros:~/etc/.rpmmacros:~/.rpmmacros"
        local dump='%{echo:dummy: PACKAGE_NAME %{name} }%dump'
        # FIXME: better ideas than .rpmrc?
        printf 'include:/usr/lib/rpm/rpmrc\nmacrofiles:%s\n' $macrofiles > 
.rpmrc
+# TODO: move these to /usr/lib/rpm/macros
+       cat > .rpmmacros <<'EOF'
+%requires_releq_kernel_up %{nil}
+%requires_releq_kernel_smp %{nil}
+%releq_kernel_up ERROR
+%releq_kernel_smp ERROR
+EOF
        case "$RPMBUILD" in
                rpm )
                        rpm --rcfile .rpmrc -bp --nodeps --define "prep $dump" 
$BCOND $TARGET_SWITCH $SPECFILE 2>&1
@@ -350,10 +357,10 @@
                        rpmbuild --rcfile .rpmrc --nodigest --nodeps 
--nosignature --nobuild --define "prep $dump" $BCOND $TARGET_SWITCH $SPECFILE 
2>&1
                        ;;
        esac`
-#      if [ $? -gt 0 ]; then
-#              echo "$rpm_dump_cache" | sed -ne '/^error:/,$p'  >&2
-#              Exit_error err_build_fail;
-#      fi
+       if [ $? -gt 0 ]; then
+               echo "$rpm_dump_cache" | sed -ne '/^error:/,$p'  >&2
+               Exit_error err_build_fail;
+       fi
        update_shell_title "cache_rpm_dump: OK!"
 }
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/builder?r1=1.387&r2=1.388&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to