I was building a package and I made a macro which did not work. The shell interpreted it wrong and gave me errors. However even though the shell gave me errors the spec file did not stop the build. This is very dangerous. I thought all errors would terminate the build process. Ken Estes + cd MD5-1.7 + chown -R root . + chgrp -R other . + chmod -R a+rX,g-w,o-w . + '[!' -x /opt/perl/1.7/bin/perl ']' /usr/local/src/redhat/BUILD/rpm-tmp.14727: [!: command not found + '[!' -f /opt/perl/1.7/bin/perl ']' /usr/local/src/redhat/BUILD/rpm-tmp.14727: [!: command not found + '[!' -d '/opt/perl/1.7/lib/site_perl/*/share' ']' /usr/local/src/redhat/BUILD/rpm-tmp.14727: [!: command not found + '[!' -d '/opt/perl/1.7/lib/site_perl/*/sparc-solaris2.6' ']' /usr/local/src/redhat/BUILD/rpm-tmp.14727: [!: command not found + exit 0 Executing: %build
forgot the details! I am running RPM version 2.5.6 on a Solaris box SunOS 5.6 Generic_105181-06 sun4u sparc
Related: when building fails with eg a File not found, it continues for a while and spits out other messages. It would have saved me a *lot* of time if it had either mentioned "(rpm build failed)" immediately after the file not found, or if at the end it said "RPM build FAILED due to previous errors". As it is, it just kind of stops, and the important error messages may be buried deep within other verbose output.
The build scriptlets are run with a -e flag that should stop execution immediately on receipt of error if with a well behaved copy of bash (or other shell). Dunno what else to do. FWIW, build errors are now collected and spewed at end-of-build in rpm-4.0.1 and later.