int test = buildArgs->noBuild;
char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) : NULL;
+ /* XXX TODO: rootDir is only relevant during build, eliminate from spec */
+ spec->rootDir = buildArgs->rootdir;
if (!spec->recursing && spec->BACount) {
int x;
/* When iterating over BANames, do the source */
exit:
free(cookie);
+ spec->rootDir = NULL;
if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) {
rpmlog(RPMLOG_NOTICE, _("\n\nRPM build errors:\n"));
rpmlogPrint(NULL);
spec->anyarch = anyarch;
spec->force = force;
- if (rootDir)
- spec->rootDir = xstrdup(rootDir);
-
spec->timeCheck = rpmExpandNumeric("%{_timecheck}");
/* All the parse*() functions expect to have a line pre-read */
continue;
addMacro(NULL, "_target_cpu", NULL, spec->BANames[x], RMIL_RPMRC);
spec->BASpecs[index] = NULL;
- if (parseSpec(ts, specFile, spec->rootDir, buildRoot, 1,
+ if (parseSpec(ts, specFile, NULL, buildRoot, 1,
NULL, NULL, anyarch, force)
|| (spec->BASpecs[index] = rpmtsSetSpec(ts, NULL)) == NULL)
{
* Parse spec file into spec control structure.
* @param ts transaction set (spec file control in ts->spec)
* @param specFile
- * @param rootDir
+ * @param rootDir (unused)
* @param buildRoot
* @param recursing parse is recursive?
* @param passPhrase (unused)
char * specFile; /*!< Name of the spec file. */
char * buildRoot;
char * buildSubdir;
- char * rootDir;
+ const char * rootDir;
speclines sl;
spectags st;
spec->buildRoot = _free(spec->buildRoot);
spec->buildSubdir = _free(spec->buildSubdir);
- spec->rootDir = _free(spec->rootDir);
spec->specFile = _free(spec->specFile);
closeSpec(spec);
goto exit;
/* FIX: make spec abstract */
- if (parseSpec(ts, arg, "/", buildRoot, recursing, NULL,
+ if (parseSpec(ts, arg, NULL, buildRoot, recursing, NULL,
NULL, anyarch, force)
|| (spec = rpmtsSetSpec(ts, NULL)) == NULL)
{
* set to get back the results from parseSpec()...
*/
ts = rpmtsCreate();
- if (parseSpec(ts, specfile,"/", buildRoot,recursing, passPhrase,
+ if (parseSpec(ts, specfile, NULL, buildRoot,recursing, passPhrase,
cookie, anyarch, force) == 0) {
spec = rpmtsSpec(ts);
} else {
/* Parse the spec file */
#define _anyarch(_f) \
(((_f)&(RPMBUILD_PREP|RPMBUILD_BUILD|RPMBUILD_INSTALL|RPMBUILD_PACKAGEBINARY)) == 0)
- if (parseSpec(ts, specFile, ba->rootdir, buildRootURL, 0, NULL,
+ if (parseSpec(ts, specFile, NULL, buildRootURL, 0, NULL,
NULL, _anyarch(buildAmount), ba->force))
{
goto exit;