Identation fixes
This commit is contained in:
parent
10e111f785
commit
4891e1f7ec
@ -704,116 +704,110 @@ resolveFirstLevelSourceDependencies(struct configTag *ct, int archidx)
|
|||||||
|
|
||||||
logmsg(LOG_DEBUG,"resolveFirstLevelSourceDependencies - sources");
|
logmsg(LOG_DEBUG,"resolveFirstLevelSourceDependencies - sources");
|
||||||
while (currsourceheader) {
|
while (currsourceheader) {
|
||||||
if (!currsourceheader->firstchild[archidx]) { // ignore SRPMs with no builds
|
if (!currsourceheader->firstchild[archidx]) { // ignore SRPMs with no builds
|
||||||
currsourceheader = currsourceheader->next;
|
currsourceheader = currsourceheader->next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
scanheader = ct->headerlist[archidx];
|
scanheader = ct->headerlist[archidx];
|
||||||
currsourceheader->requirelist = NULL;
|
currsourceheader->requirelist = NULL;
|
||||||
// currsourceheader->require.resolved = malloc(sizeof(struct providedList*)*currsourceheader->requirecount);
|
// currsourceheader->require.resolved = malloc(sizeof(struct providedList*)*currsourceheader->requirecount);
|
||||||
for (i = 0; i < currsourceheader->requirecount; i++) {
|
for (i = 0; i < currsourceheader->requirecount; i++) {
|
||||||
/* if (strncmp("a2ps",currsourceheader->name,4) == 0) {
|
if (strncmp("rpmlib(",currsourceheader->require[i]->name,7) &&
|
||||||
fprintf(stderr,"a2ps:%s\n",currheader->require[i]->name);
|
strncmp("debuginfo(build-id)",currsourceheader->require[i]->name,20)) {
|
||||||
}*/
|
provided=findOrCreateProvidedListEntry((struct providedList**) &ct->providedlist_idx[archidx],
|
||||||
if (strncmp("rpmlib(",currsourceheader->require[i]->name,7) &&
|
currsourceheader->require[i]->name,1,archidx);
|
||||||
strncmp("debuginfo(build-id)",currsourceheader->require[i]->name,20)) {
|
if (provided->numbuildproviders == 0) {
|
||||||
provided=findOrCreateProvidedListEntry((struct providedList**) &ct->providedlist_idx[archidx],
|
// check if require[i]->name requirement is met
|
||||||
currsourceheader->require[i]->name,1,archidx);
|
if ((currsourceheader->require[i]->name)[0] == '/') {
|
||||||
if (provided->numbuildproviders == 0) {
|
/* requirement is a file, find who provides it */
|
||||||
// check if require[i]->name requirement is met
|
file=findOrCreateFileTreeEntry(&ct->filetree[archidx],currsourceheader->require[i]->name, archidx);
|
||||||
|
if (file->numproviders > 0) {
|
||||||
if ((currsourceheader->require[i]->name)[0] == '/') {
|
provided->numbuildproviders=file->numproviders;
|
||||||
/* requirement is a file, find who provides it */
|
provided->buildprovider=file->provider;
|
||||||
file=findOrCreateFileTreeEntry(&ct->filetree[archidx],currsourceheader->require[i]->name, archidx);
|
provided->flags=0;
|
||||||
if (file->numproviders > 0) {
|
logmsg(LOG_DEBUG,"file %s is a build provider for %s",currsourceheader->require[i]->name,currsourceheader->name);
|
||||||
provided->numbuildproviders=file->numproviders;
|
}
|
||||||
provided->buildprovider=file->provider;
|
} else {
|
||||||
provided->flags=0;
|
/* requirement is not a file, cross-check with provides */
|
||||||
logmsg(LOG_DEBUG,"file %s is a build provider for %s",currsourceheader->require[i]->name,currsourceheader->name);
|
scanheader = ct->headerlist[archidx];
|
||||||
}
|
while (scanheader) {
|
||||||
} else {
|
if (checkRequireWithProvides(
|
||||||
/* requirement is not a file, cross-check with provides */
|
currsourceheader->require[i]->name,
|
||||||
scanheader = ct->headerlist[archidx];
|
scanheader)) provided->numbuildproviders+=1;
|
||||||
while (scanheader) {
|
scanheader = scanheader->next;
|
||||||
if (checkRequireWithProvides(
|
}
|
||||||
currsourceheader->require[i]->name,
|
if (provided->numbuildproviders > 0) {
|
||||||
scanheader)) provided->numbuildproviders+=1;
|
provided->buildprovider = malloc(sizeof(struct headerList*) * provided->numbuildproviders);
|
||||||
scanheader = scanheader->next;
|
provided->flags = 0;
|
||||||
}
|
scanheader = ct->headerlist[archidx];
|
||||||
if (provided->numbuildproviders > 0) {
|
j = 0;
|
||||||
provided->buildprovider = malloc(sizeof(struct headerList*) * provided->numbuildproviders);
|
while (scanheader) {
|
||||||
provided->flags = 0;
|
if (checkRequireWithProvides(
|
||||||
scanheader = ct->headerlist[archidx];
|
currsourceheader->require[i]->name,
|
||||||
j = 0;
|
scanheader)) provided->buildprovider[j++] = scanheader;
|
||||||
while (scanheader) {
|
scanheader = scanheader->next;
|
||||||
if (checkRequireWithProvides(
|
}
|
||||||
currsourceheader->require[i]->name,
|
logmsg(LOG_DEBUG,"%s is a build provider for %s",provided->name,currsourceheader->name);
|
||||||
scanheader)) provided->buildprovider[j++] = scanheader;
|
}
|
||||||
scanheader = scanheader->next;
|
}
|
||||||
}
|
if (provided->numbuildproviders == 0 && incremental_mode) {
|
||||||
logmsg(LOG_DEBUG,"%s is a build provider for %s",provided->name,currsourceheader->name);
|
snprintf(warning,PATH_MAX,"missing build provider for %s",currsourceheader->require[i]->name);
|
||||||
}
|
fprintf(stderr,"Warning: %s(source,%s): %s\n",
|
||||||
}
|
currsourceheader->name,
|
||||||
if (provided->numbuildproviders == 0 && incremental_mode) {
|
ct->repository[currsourceheader->altrepository]->tag,
|
||||||
snprintf(warning,PATH_MAX,"missing build provider for %s",currsourceheader->require[i]->name);
|
warning);
|
||||||
fprintf(stderr,"Warning: %s(source,%s): %s\n",
|
addWarning(currsourceheader,warning);
|
||||||
currsourceheader->name,
|
}
|
||||||
ct->repository[currsourceheader->altrepository]->tag,
|
|
||||||
warning);
|
|
||||||
addWarning(currsourceheader,warning);
|
|
||||||
}
|
|
||||||
//} else if (provided->numbuildproviders > 1) {
|
//} else if (provided->numbuildproviders > 1) {
|
||||||
/*printf("Multiple providers for %s in package %s\n",currsourceheader->require[i]->name,currsourceheader->name);*/
|
/*printf("Multiple providers for %s in package %s\n",currsourceheader->require[i]->name,currsourceheader->name);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if (provided->numbuildproviders > 0) {
|
if (provided->numbuildproviders > 0) {
|
||||||
if (strcmp(currsourceheader->require[i]->version,"") &&
|
if (strcmp(currsourceheader->require[i]->version,"") &&
|
||||||
(currsourceheader->require[i]->flags & (RPMSENSE_LESS+RPMSENSE_GREATER+RPMSENSE_EQUAL))) {
|
(currsourceheader->require[i]->flags & (RPMSENSE_LESS+RPMSENSE_GREATER+RPMSENSE_EQUAL))) {
|
||||||
found = 0;
|
found = 0;
|
||||||
for (j = 0; j < provided->numproviders; j++) {
|
for (j = 0; j < provided->numproviders; j++) {
|
||||||
if (!strcmp(provided->version[j],"")) {
|
if (!strcmp(provided->version[j],"")) {
|
||||||
/* provider with no version; assume ok */
|
/* provider with no version; assume ok */
|
||||||
found = 1;
|
found = 1;
|
||||||
} else {
|
} else {
|
||||||
if (checkVersionWithFlags(
|
if (checkVersionWithFlags(
|
||||||
currsourceheader->require[i]->version,
|
currsourceheader->require[i]->version,
|
||||||
currsourceheader->require[i]->flags,
|
currsourceheader->require[i]->flags,
|
||||||
provided->version[j])) found = 1;
|
provided->version[j])) found = 1;
|
||||||
}
|
}
|
||||||
} /* for */
|
} /* for */
|
||||||
if (!found) {
|
if (!found) {
|
||||||
if (currsourceheader->altrepository == ct->repository_level) {
|
if (currsourceheader->altrepository == ct->repository_level) {
|
||||||
fprintf(stderr,"Warning: %s(source): build requires %s ",currsourceheader->name,currsourceheader->require[i]->name);
|
fprintf(stderr,"Warning: %s(source): build requires %s ",currsourceheader->name,currsourceheader->require[i]->name);
|
||||||
if (currsourceheader->require[i]->flags & RPMSENSE_LESS) fprintf(stderr,"<");
|
if (currsourceheader->require[i]->flags & RPMSENSE_LESS) fprintf(stderr,"<");
|
||||||
if (currsourceheader->require[i]->flags & RPMSENSE_GREATER) fprintf(stderr,">");
|
if (currsourceheader->require[i]->flags & RPMSENSE_GREATER) fprintf(stderr,">");
|
||||||
if (currsourceheader->require[i]->flags & RPMSENSE_EQUAL) fprintf(stderr,"=");
|
if (currsourceheader->require[i]->flags & RPMSENSE_EQUAL) fprintf(stderr,"=");
|
||||||
fprintf(stderr," %s (failing build provider(s):", currsourceheader->require[i]->version);
|
fprintf(stderr," %s (failing build provider(s):", currsourceheader->require[i]->version);
|
||||||
for (j = 0; j < provided->numbuildproviders; j++) {
|
for (j = 0; j < provided->numbuildproviders; j++) {
|
||||||
fprintf(stderr," %s#%s",
|
fprintf(stderr," %s#%s",
|
||||||
provided->provider[j]->name, provided->buildprovider[j]->version);
|
provided->provider[j]->name, provided->buildprovider[j]->version);
|
||||||
/* printrpmversion(buffer,PATH_MAX,
|
/* printrpmversion(buffer,PATH_MAX,
|
||||||
provided->provider[j]->epoch,
|
provided->provider[j]->epoch,
|
||||||
provided->provider[j]->version,
|
provided->provider[j]->version,
|
||||||
provided->provider[j]->release));*/
|
provided->provider[j]->release));*/
|
||||||
}
|
}
|
||||||
fprintf(stderr,")\n");
|
fprintf(stderr,")\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
currsourceheader->require[i]->resolved=provided;
|
||||||
currsourceheader->require[i]->resolved=provided;
|
} else {
|
||||||
} else {
|
currsourceheader->require[i]->resolved=NULL;
|
||||||
currsourceheader->require[i]->resolved=NULL;
|
}
|
||||||
}
|
}
|
||||||
}
|
// sort required list by first provider's name
|
||||||
|
qsort((void *) &currsourceheader->require[0],
|
||||||
// sort required list by first provider's name
|
currsourceheader->requirecount,
|
||||||
qsort((void *) &currsourceheader->require[0],
|
sizeof(struct Require *),
|
||||||
currsourceheader->requirecount,
|
compareRequiredList);
|
||||||
sizeof(struct Require *),
|
currsourceheader = currsourceheader->next;
|
||||||
compareRequiredList);
|
|
||||||
currsourceheader = currsourceheader->next;
|
|
||||||
}
|
}
|
||||||
logmsg(LOG_DEBUG,"resolveFirstLevelSourceDependencies - done");
|
logmsg(LOG_DEBUG,"resolveFirstLevelSourceDependencies - done");
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user