diff options
author | jbj <devnull@localhost> | 2001-01-01 23:14:47 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-01-01 23:14:47 +0000 |
commit | fa3e119a8350665f9c8d98929e4ceed041c4c3f3 (patch) | |
tree | 43c1a3792586dabb1eee5aa2ad05e9b1010cb4ab /build.c | |
parent | f2f0eb928e912e49baec2970529f74980d16aab1 (diff) | |
download | rpm-fa3e119a8350665f9c8d98929e4ceed041c4c3f3.tar.gz rpm-fa3e119a8350665f9c8d98929e4ceed041c4c3f3.tar.bz2 rpm-fa3e119a8350665f9c8d98929e4ceed041c4c3f3.zip |
- use popt autohelp for rpm helper binaries.
CVS patchset: 4396
CVS date: 2001/01/01 23:14:47
Diffstat (limited to 'build.c')
-rw-r--r-- | build.c | 23 |
1 files changed, 9 insertions, 14 deletions
@@ -87,12 +87,10 @@ static int isSpecFile(const char *specfile) } static int buildForTarget(const char *arg, struct rpmBuildArguments *ba, - const char *passPhrase, int fromTarball, char *cookie, - int force, int nodeps) + const char *passPhrase, char *cookie) { int buildAmount = ba->buildAmount; const char *buildRootURL = NULL; - int test = ba->noBuild; const char * specFile; const char * specURL; int specut; @@ -107,7 +105,7 @@ static int buildForTarget(const char *arg, struct rpmBuildArguments *ba, if (ba->buildRootOverride) buildRootURL = rpmGenPath(NULL, ba->buildRootOverride, NULL); - if (fromTarball) { + if (ba->buildMode == 't') { FILE *fp; const char *specDir; const char * tmpSpecFile; @@ -237,7 +235,7 @@ static int buildForTarget(const char *arg, struct rpmBuildArguments *ba, #define _anyarch(_f) \ (((_f)&(RPMBUILD_PREP|RPMBUILD_BUILD|RPMBUILD_INSTALL|RPMBUILD_PACKAGEBINARY)) == 0) if (parseSpec(&spec, specURL, ba->rootdir, buildRootURL, 0, passPhrase, - cookie, _anyarch(buildAmount), force)) { + cookie, _anyarch(buildAmount), ba->force)) { rc = 1; goto exit; } @@ -247,17 +245,17 @@ static int buildForTarget(const char *arg, struct rpmBuildArguments *ba, initSourceHeader(spec); /* Check build prerequisites */ - if (!nodeps && checkSpec(spec->sourceHeader)) { + if (!ba->noDeps && checkSpec(spec->sourceHeader)) { rc = 1; goto exit; } - if (buildSpec(spec, buildAmount, test)) { + if (buildSpec(spec, buildAmount, ba->noBuild)) { rc = 1; goto exit; } - if (fromTarball) Unlink(specURL); + if (ba->buildMode == 't') Unlink(specURL); rc = 0; exit: @@ -269,8 +267,7 @@ exit: } int build(const char * arg, struct rpmBuildArguments * ba, - const char * passPhrase, int fromTarball, char * cookie, - const char * rcfile, int force, int nodeps) + const char * passPhrase, char * cookie, const char * rcfile) { char *t, *te; int rc = 0; @@ -279,8 +276,7 @@ int build(const char * arg, struct rpmBuildArguments * ba, int cleanFlags = ba->buildAmount & buildCleanMask; if (targets == NULL) { - rc = buildForTarget(arg, ba, passPhrase, fromTarball, cookie, - force, nodeps); + rc = buildForTarget(arg, ba, passPhrase, cookie); goto exit; } @@ -306,8 +302,7 @@ int build(const char * arg, struct rpmBuildArguments * ba, /* Read in configuration for target. */ rpmFreeMacros(NULL); rpmReadConfigFiles(rcfile, target); - rc = buildForTarget(arg, ba, passPhrase, fromTarball, cookie, - force, nodeps); + rc = buildForTarget(arg, ba, passPhrase, cookie); if (rc) break; } |