diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-09-01 13:46:49 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-09-01 13:46:49 +0300 |
commit | 628de71cdebf8ed8cb1574b39de6fe0150dd65fb (patch) | |
tree | 86db91663903d4431772592650995b5fc3a80245 | |
parent | bd9e1b9d9bafe7246a43297d5d148838c873a21d (diff) | |
download | librpm-tizen-628de71cdebf8ed8cb1574b39de6fe0150dd65fb.tar.gz librpm-tizen-628de71cdebf8ed8cb1574b39de6fe0150dd65fb.tar.bz2 librpm-tizen-628de71cdebf8ed8cb1574b39de6fe0150dd65fb.zip |
Sanitize buildSpec() arguments a bit
-rw-r--r-- | build/build.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/build/build.c b/build/build.c index 49f70bd84..1b829aeec 100644 --- a/build/build.c +++ b/build/build.c @@ -213,9 +213,10 @@ exit: return rc; } -static rpmRC buildSpec(rpmts ts, rpmSpec spec, int what, int test) +static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what) { rpmRC rc = RPMRC_OK; + int test = buildArgs->noBuild; if (!spec->recursing && spec->BACount) { int x; @@ -223,10 +224,9 @@ static rpmRC buildSpec(rpmts ts, rpmSpec spec, int what, int test) /* packaging on the first run, and skip RMSOURCE altogether */ if (spec->BASpecs != NULL) for (x = 0; x < spec->BACount; x++) { - if ((rc = buildSpec(ts, spec->BASpecs[x], + if ((rc = buildSpec(buildArgs, spec->BASpecs[x], (what & ~RPMBUILD_RMSOURCE) | - (x ? 0 : (what & RPMBUILD_PACKAGESOURCE)), - test))) { + (x ? 0 : (what & RPMBUILD_PACKAGESOURCE))))) { goto exit; } } @@ -294,5 +294,6 @@ exit: rpmRC rpmSpecBuild(BTA_t buildArgs, rpmSpec spec) { - return buildSpec(NULL, spec, buildArgs->buildAmount, buildArgs->noBuild); + /* buildSpec() can recurse with different buildAmount, pass it separately */ + return buildSpec(buildArgs, spec, buildArgs->buildAmount); } |