static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
{
rpmRC rc = RPMRC_OK;
- int test = buildArgs->noBuild;
+ int test = (what & RPMBUILD_NOBUILD);
char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) : NULL;
/* XXX TODO: rootDir is only relevant during build, eliminate from spec */
extern int _fsm_debug;
-static int noBuild = 0;
-
int _noDirTokens = 0;
/**
}
break;
- case POPT_NOBUILD: rba->noBuild = 1; break;
+ case POPT_NOBUILD: rba->buildAmount |= RPMBUILD_NOBUILD; break;
case POPT_NOLANG: rba->specFlags |= RPMSPEC_NOLANG; break;
case POPT_SHORTCIRCUIT: rba->shortCircuit = 1; break;
case POPT_RMSOURCE: rba->buildAmount |= RPMBUILD_RMSOURCE; break;
N_("ignore ExcludeArch: directives from spec file"), NULL},
{ "fsmdebug", '\0', (POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN), &_fsm_debug, -1,
N_("debug file state machine"), NULL},
- { "nobuild", '\0', 0, &noBuild, POPT_NOBUILD,
+ { "nobuild", '\0', 0, 0, POPT_NOBUILD,
N_("do not execute any stages of the build"), NULL },
{ "nodeps", '\0', 0, NULL, RPMCLI_POPT_NODEPS,
N_("do not verify build dependencies"), NULL },
RPMBUILD_RMSOURCE = (1 << 8), /*!< Remove source(s) and patch(s). */
RPMBUILD_RMBUILD = (1 << 9), /*!< Remove build sub-tree. */
RPMBUILD_STRINGBUF = (1 << 10), /*!< only for doScript() */
- RPMBUILD_RMSPEC = (1 << 11) /*!< Remove spec file. */
+ RPMBUILD_RMSPEC = (1 << 11), /*!< Remove spec file. */
+
+ RPMBUILD_NOBUILD = (1 << 31) /*!< Don't execute or package. */
} rpmBuildFlags;
/** \ingroup rpmbuild
char * buildRootOverride; /*!< from --buildroot */
char * targets; /*!< Target platform(s), comma separated. */
char * cookie; /*!< NULL for binary, ??? for source, rpm's */
- int noBuild; /*!< from --nobuild */
int noDeps; /*!< from --nodeps */
int shortCircuit; /*!< from --short-circuit */
char buildMode; /*!< Build mode (one of "btBC") */