diff options
author | jbj <devnull@localhost> | 2000-09-01 21:15:40 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2000-09-01 21:15:40 +0000 |
commit | f2efc7263e952cef24f2196f92d02ee0b3b9aa1e (patch) | |
tree | 9fc55f7f93eb4a4d875c20a868f430f1b15af141 /build/build.c | |
parent | 4f0179f7ee468c3876ee823a69d89c236784372f (diff) | |
download | librpm-tizen-f2efc7263e952cef24f2196f92d02ee0b3b9aa1e.tar.gz librpm-tizen-f2efc7263e952cef24f2196f92d02ee0b3b9aa1e.tar.bz2 librpm-tizen-f2efc7263e952cef24f2196f92d02ee0b3b9aa1e.zip |
- unify rpmError and rpmMessge interfaces through rpmlog.
- collect and display rpm build error messages at end of build.
CVS patchset: 4149
CVS date: 2000/09/01 21:15:40
Diffstat (limited to 'build/build.c')
-rw-r--r-- | build/build.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/build/build.c b/build/build.c index 721a4a643..9f0da56bc 100644 --- a/build/build.c +++ b/build/build.c @@ -249,46 +249,46 @@ int buildSpec(Spec spec, int what, int test) (what & ~RPMBUILD_RMSOURCE) | (x ? 0 : (what & RPMBUILD_PACKAGESOURCE)), test))) { - return rc; + goto exit; } } } else { if ((what & RPMBUILD_PREP) && (rc = doScript(spec, RPMBUILD_PREP, NULL, NULL, test))) - return rc; + goto exit; if ((what & RPMBUILD_BUILD) && (rc = doScript(spec, RPMBUILD_BUILD, NULL, NULL, test))) - return rc; + goto exit; if ((what & RPMBUILD_INSTALL) && (rc = doScript(spec, RPMBUILD_INSTALL, NULL, NULL, test))) - return rc; + goto exit; if ((what & RPMBUILD_PACKAGESOURCE) && (rc = processSourceFiles(spec))) - return rc; + goto exit; if (((what & RPMBUILD_INSTALL) || (what & RPMBUILD_PACKAGEBINARY) || (what & RPMBUILD_FILECHECK)) && (rc = processBinaryFiles(spec, what & RPMBUILD_INSTALL, test))) - return rc; + goto exit; if (((what & RPMBUILD_PACKAGESOURCE) && !test) && (rc = packageSources(spec))) - return rc; + goto exit; if (((what & RPMBUILD_PACKAGEBINARY) && !test) && (rc = packageBinaries(spec))) - return rc; + goto exit; if ((what & RPMBUILD_CLEAN) && (rc = doScript(spec, RPMBUILD_CLEAN, NULL, NULL, test))) - return rc; + goto exit; if ((what & RPMBUILD_RMBUILD) && (rc = doScript(spec, RPMBUILD_RMBUILD, NULL, NULL, test))) - return rc; + goto exit; } if (what & RPMBUILD_RMSOURCE) @@ -296,6 +296,13 @@ int buildSpec(Spec spec, int what, int test) if (what & RPMBUILD_RMSPEC) unlink(spec->specFile); + rc = 0; - return 0; +exit: + if (rc && rpmlogGetNrecs() > 0) { + rpmMessage(RPMMESS_NORMAL, _("\n\nRPM build errors:\n")); + rpmlogPrint(NULL); + } + + return rc; } |