From bd9e1b9d9bafe7246a43297d5d148838c873a21d Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 1 Sep 2010 13:37:37 +0300 Subject: [PATCH] Replace buildSpec() with a new interface in the API - Accept the entire build arguments structure along with a spec, these contain everything that we'll need - Just a convenience wrapper for buildSpec() for now, more things to follow... - Update the sole existing caller accordingly --- build/build.c | 7 ++++++- build/rpmbuild.h | 6 ++---- rpmbuild.c | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/build/build.c b/build/build.c index 3652739..49f70bd 100644 --- a/build/build.c +++ b/build/build.c @@ -213,7 +213,7 @@ exit: return rc; } -rpmRC buildSpec(rpmts ts, rpmSpec spec, int what, int test) +static rpmRC buildSpec(rpmts ts, rpmSpec spec, int what, int test) { rpmRC rc = RPMRC_OK; @@ -291,3 +291,8 @@ exit: return rc; } + +rpmRC rpmSpecBuild(BTA_t buildArgs, rpmSpec spec) +{ + return buildSpec(NULL, spec, buildArgs->buildAmount, buildArgs->noBuild); +} diff --git a/build/rpmbuild.h b/build/rpmbuild.h index 0023e51..6d340d6 100644 --- a/build/rpmbuild.h +++ b/build/rpmbuild.h @@ -92,13 +92,11 @@ int parseSpec(rpmts ts, const char * specFile, /** \ingroup rpmbuild * Build stages state machine driver. - * @param ts transaction set + * @param buildArgs build arguments * @param spec spec file control structure - * @param what bit(s) to enable stages of build - * @param test don't execute scripts or package if testing * @return RPMRC_OK on success */ -rpmRC buildSpec(rpmts ts, rpmSpec spec, int what, int test); +rpmRC rpmSpecBuild(BTA_t buildArgs, rpmSpec spec); #ifdef __cplusplus } diff --git a/rpmbuild.c b/rpmbuild.c index e58ed3f..cd9db7c 100644 --- a/rpmbuild.c +++ b/rpmbuild.c @@ -290,7 +290,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba) goto exit; } - if (buildSpec(ts, spec, buildAmount, ba->noBuild)) { + if (rpmSpecBuild(ba, spec)) { goto exit; } -- 2.7.4