summaryrefslogtreecommitdiff
path: root/rpmbuild.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-09-01 16:59:22 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-09-01 16:59:22 +0300
commitcbd5d98a8416a1f6c875cde82f3f1c3b02c120d7 (patch)
treeefab0071ae7c9e0ade2c7ffccc4f0c973f5a16cd /rpmbuild.c
parentc7ccdea6386b9f9cd8be5ff459be99955b56f2ef (diff)
downloadrpm-cbd5d98a8416a1f6c875cde82f3f1c3b02c120d7.tar.gz
Update callers to use the new rpmSpecParse() interface
Diffstat (limited to 'rpmbuild.c')
-rw-r--r--rpmbuild.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/rpmbuild.c b/rpmbuild.c
index 8ad6c9194..a03b50f35 100644
--- a/rpmbuild.c
+++ b/rpmbuild.c
@@ -202,6 +202,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba)
rpmSpec spec = NULL;
int rc = 1; /* assume failure */
int justRm = ((buildAmount & ~(RPMBUILD_RMSOURCE|RPMBUILD_RMSPEC)) == 0);
+ rpmSpecFlags specFlags = RPMSPEC_NONE;
#ifndef DYING
rpmSetTables(RPM_MACHTABLE_BUILDARCH, RPM_MACHTABLE_BUILDOS);
@@ -274,13 +275,14 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba)
/* Parse the spec file */
#define _anyarch(_f) \
(((_f)&(RPMBUILD_PREP|RPMBUILD_BUILD|RPMBUILD_INSTALL|RPMBUILD_PACKAGEBINARY)) == 0)
- if (parseSpec(ts, specFile, NULL, buildRootURL, 0, NULL,
- NULL, _anyarch(buildAmount), ba->force))
- {
- goto exit;
- }
+ if (_anyarch(buildAmount))
+ specFlags |= RPMSPEC_ANYARCH;
+ if (ba->force)
+ specFlags |= RPMSPEC_FORCE;
#undef _anyarch
- if ((spec = rpmtsSetSpec(ts, NULL)) == NULL) {
+
+ spec = rpmSpecParse(specFile, specFlags, buildRootURL);
+ if (spec == NULL) {
goto exit;
}