fi->fgids = xcalloc(sizeof(*fi->fgids), fi->fc);
/* Make the cpio list */
+ if (fi->dil != NULL) /* XXX can't happen */
for (i = 0, flp = fl->fileList; i < fi->fc; i++, flp++) {
char * b;
fi->fmapflags[i] |= CPIO_FOLLOW_SYMLINKS;
}
- /*@-branchstate@*/
+ /*@-branchstate -compdef@*/
if (fip)
*fip = fi;
else
fi = rpmfiFree(fi);
- /*@=branchstate@*/
+ /*@=branchstate =compdef@*/
}
}
/*@=bounds@*/
/* XXX Fish the pkgid out of the signature header. */
if (sig != NULL && pkgidp != NULL) {
- HGE_t hge = (HGE_t)headerGetEntry;
- unsigned char * md5 = NULL;
- rpmTagType type;
+ int_32 tagType;
+ unsigned char * MD5 = NULL;
int_32 c;
int xx;
- xx = hge(sig, RPMSIGTAG_MD5, &type, (void **)&md5, &c);
- if (type == RPM_BIN_TYPE && md5 != NULL && c == 16)
- *pkgidp = md5;
+ xx = headerGetEntry(sig, RPMSIGTAG_MD5, &tagType, (void **)&MD5, &c);
+ if (tagType == RPM_BIN_TYPE && MD5 != NULL && c == 16)
+ *pkgidp = MD5;
}
sig = rpmFreeSignature(sig);
rc = writeRPM(&pkg->header, NULL, fn, RPMLEAD_BINARY,
csa, spec->passPhrase, NULL);
- csa->cpioList = rpmfiFree(pkg->cpioList);
+ csa->cpioList = rpmfiFree(csa->cpioList);
csa->cpioFdIn = fdFree(csa->cpioFdIn, "init (packageBinaries)");
/*@=type@*/
fn = _free(fn);
rc = writeRPM(&spec->sourceHeader, &spec->sourcePkgId, fn, RPMLEAD_SOURCE,
csa, spec->passPhrase, &(spec->cookie));
- csa->cpioList = rpmfiFree(spec->sourceCpioList);
+ csa->cpioList = rpmfiFree(csa->cpioList);
csa->cpioFdIn = fdFree(csa->cpioFdIn, "init (packageSources)");
/*@=type@*/
fn = _free(fn);
|| (spec->BASpecs[index] = rpmtsSetSpec(ts, NULL)) == NULL)
{
spec->BACount = index;
+/*@-nullstate@*/
spec = freeSpec(spec);
return RPMERR_BADSPEC;
+/*@=nullstate@*/
}
#ifdef DYING
rpmSetMachine(saveArch, NULL);
spec->BACount = index;
if (! index) {
- spec = freeSpec(spec);
rpmError(RPMERR_BADSPEC,
_("No compatible architectures found for build\n"));
+/*@-nullstate@*/
+ spec = freeSpec(spec);
return RPMERR_BADSPEC;
+/*@=nullstate@*/
}
/*
/*@null@*/ const char * passPhrase,
/*@null@*/ char * cookie,
int anyarch, int force)
- /*@globals rpmGlobalMacroContext,
- fileSystem, internalState @*/
- /*@modifies *specp,
- rpmGlobalMacroContext, fileSystem, internalState @*/;
+ /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
+ /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Build stages state machine driver.
* @return 0 on success
*/
int buildSpec(Spec spec, int what, int test)
- /*@globals rpmGlobalMacroContext,
- fileSystem, internalState @*/
+ /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
/*@modifies spec->sourceHeader, spec->sourceCpioList, spec->cookie,
spec->sourceRpmName, spec->sourcePkgId,
spec->macros, spec->BASpecs,
* @return 0 on success
*/
int packageBinaries(Spec spec)
- /*@globals rpmGlobalMacroContext,
- fileSystem, internalState @*/
- /*@modifies spec->packages->header,
+ /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
+ /*@modifies spec->packages->header, spec->packages->cpioList,
spec->sourceRpmName,
rpmGlobalMacroContext, fileSystem, internalState @*/;
* @return 0 on success
*/
int packageSources(Spec spec)
- /*@globals rpmGlobalMacroContext,
- fileSystem, internalState @*/
- /*@modifies spec->sourceHeader, spec->cookie,
+ /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
+ /*@modifies spec->sourceHeader, spec->cookie, spec->sourceCpioList,
spec->sourceRpmName, spec->sourcePkgId,
rpmGlobalMacroContext, fileSystem, internalState @*/;
unsigned char * sourcePkgId;
/*@refcounted@*/
Header sourceHeader;
+/*@refcounted@*/
rpmfi sourceCpioList;
/*@dependent@*/ /*@null@*/ MacroContext macros;
Header header;
/*@refcounted@*/
rpmds this;
+/*@refcounted@*/
rpmfi cpioList;
/*@owned@*/
if (qva->qva_showPackage == NULL)
goto exit;
+/*@-branchstate@*/
/*@-mods@*/ /* FIX: make spec abstract */
if (parseSpec(ts, arg, "/", buildRoot, recursing, passPhrase,
cookie, anyarch, force)
goto exit;
}
/*@=mods@*/
+/*@=branchstate@*/
res = 0;
if (specedit) {
/*@only@*/ /*@null@*/
const char ** flangs; /*!< File lang(s) (from header) */
-/*@only@*/ /*?null?*/
+/*@only@*/ /*@relnull@*/
uint_32 * dil; /*!< Directory indice(s) (from header) */
/*@only@*/ /*?null?*/
const uint_32 * fflags; /*!< File flag(s) (from header) */
Spec rpmtsSpec(rpmts ts)
{
+/*@-compdef -retexpose -usereleased@*/
return ts->spec;
+/*@=compdef =retexpose =usereleased@*/
}
Spec rpmtsSetSpec(rpmts ts, Spec spec)
{
Spec ospec = ts->spec;
+/*@-assignexpose -temptrans@*/
ts->spec = spec;
+/*@=assignexpose =temptrans@*/
return ospec;
}
* @param ts transaction set
* @return spec control structure
*/
+/*@null@*/
Spec rpmtsSpec(rpmts ts)
/*@*/;
* @param spec new spec control structure
* @return previous spec control structure
*/
+/*@null@*/
Spec rpmtsSetSpec(rpmts ts, /*@null@*/ Spec spec)
/*@modifies ts @*/;