Replace buildSpec() with a new interface in the API
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 1 Sep 2010 10:37:37 +0000 (13:37 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 1 Sep 2010 10:37:37 +0000 (13:37 +0300)
- 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
build/rpmbuild.h
rpmbuild.c

index 3652739..49f70bd 100644 (file)
@@ -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);
+}
index 0023e51..6d340d6 100644 (file)
@@ -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
 }
index e58ed3f..cd9db7c 100644 (file)
@@ -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;
     }