summaryrefslogtreecommitdiff
path: root/build.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1998-08-08 22:27:08 +0000
committerjbj <devnull@localhost>1998-08-08 22:27:08 +0000
commitaa8549e65b669b39fc8e9eb6e9288e853f5175d8 (patch)
tree532fa62d15bb5e6c905539ed9b47a6d38f10ddf4 /build.c
parent145d77b79d95dcf1f4866921f97e97602c275f65 (diff)
downloadrpm-aa8549e65b669b39fc8e9eb6e9288e853f5175d8.tar.gz
rpm-aa8549e65b669b39fc8e9eb6e9288e853f5175d8.tar.bz2
rpm-aa8549e65b669b39fc8e9eb6e9288e853f5175d8.zip
writeRPM can now copy cpio archive from fd.
iVS: ---------------------------------------------------------------------- CVS patchset: 2239 CVS date: 1998/08/08 22:27:08
Diffstat (limited to 'build.c')
-rw-r--r--build.c62
1 files changed, 34 insertions, 28 deletions
diff --git a/build.c b/build.c
index 33bd37c55..8c79320ad 100644
--- a/build.c
+++ b/build.c
@@ -6,35 +6,9 @@
int buildplatform(char *arg, int buildAmount, char *passPhrase,
char *buildRoot, int fromTarball, int test, char *cookie);
-int build(char *arg, int buildAmount, char *passPhrase,
- char *buildRoot, int fromTarball, int test, char *cookie,
- char * rcfile, char * arch, char * os,
- char *buildplatforms) {
-
- char * platform;
-
- /* parse up the build operators */
-
- printf("building these platforms: %s\n",buildplatforms);
-
- if (buildplatforms) {
- while(platform = strsep(&buildplatforms,",")) {
- printf("building %s\n",platform);
-
- rpmSetVar(RPMVAR_BUILDPLATFORM,platform);
- rpmReadConfigFiles(rcfile, arch, os, 1,platform);
- buildplatform(arg,buildAmount,passPhrase,buildRoot,
- fromTarball,test,cookie);
- }
- } else {
- buildplatform(arg,buildAmount,passPhrase,buildRoot,
- fromTarball,test,cookie);
- }
-}
-
-
int buildplatform(char *arg, int buildAmount, char *passPhrase,
- char *buildRoot, int fromTarball, int test, char *cookie) {
+ char *buildRoot, int fromTarball, int test, char *cookie)
+{
FILE *f;
char * specfile;
@@ -164,3 +138,35 @@ int buildplatform(char *arg, int buildAmount, char *passPhrase,
return res;
}
+
+int build(char *arg, int buildAmount, char *passPhrase,
+ char *buildRoot, int fromTarball, int test, char *cookie,
+ char * rcfile, char * arch, char * os,
+ char *buildplatforms)
+{
+ char * platform;
+ int rc;
+
+ /* parse up the build operators */
+
+ printf("building these platforms: %s\n", buildplatforms);
+
+ if (buildplatforms == NULL) {
+ rc = buildplatform(arg, buildAmount, passPhrase, buildRoot,
+ fromTarball, test, cookie);
+ return rc;
+ }
+
+ while((platform = strsep(&buildplatforms,",")) != NULL) {
+ printf("building %s\n", platform);
+
+ rpmSetVar(RPMVAR_BUILDPLATFORM,platform);
+ rpmReadConfigFiles(rcfile, arch, os, 1, platform);
+ rc = buildplatform(arg, buildAmount, passPhrase, buildRoot,
+ fromTarball, test, cookie);
+ if (rc)
+ return rc;
+ }
+
+ return 0;
+}