fl.fileList = freeFileList(fl.fileList, fl.fileListRecsUsed);
argvFree(fl.docDirs);
- return fl.processingFailed;
+ return fl.processingFailed ? RPMRC_FAIL : RPMRC_OK;
}
static const rpmTag sourceTags[] = {
int processBinaryFiles(rpmSpec spec, int installSpecialDoc, int test)
{
Package pkg;
- int res = 0;
+ int rc = RPMRC_OK;
check_fileList = newStringBuf();
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
const char *n, *v, *r;
- int rc;
if (pkg->fileList == NULL)
continue;
(void) headerNVR(pkg->header, &n, &v, &r);
rpmlog(RPMLOG_NOTICE, _("Processing files: %s-%s-%s\n"), n, v, r);
- if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)))
- res = rc;
-
- if ((rc = rpmfcGenerateDepends(spec, pkg)))
- res = rc;
+ if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)) != RPMRC_OK ||
+ (rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK)
+ goto exit;
}
/* Now we have in fileList list of files from all packages.
if (checkFiles(check_fileList) > 0) {
- if (res == 0)
- res = 1;
+ rc = RPMRC_FAIL;
}
-
+exit:
check_fileList = freeStringBuf(check_fileList);
- return res;
+ return rc;
}