Fix support for multiple build providers
This commit is contained in:
parent
1570c792be
commit
59e25e737f
@ -666,7 +666,6 @@ resolveFirstLevelSourceDependencies(struct configTag *ct, int archidx)
|
|||||||
currsourceheader->require[i]->name,1,archidx);
|
currsourceheader->require[i]->name,1,archidx);
|
||||||
if (provided->numbuildproviders == 0) {
|
if (provided->numbuildproviders == 0) {
|
||||||
// check if require[i]->name requirement is met
|
// check if require[i]->name requirement is met
|
||||||
scanheader = ct->headerlist[archidx];
|
|
||||||
|
|
||||||
if ((currsourceheader->require[i]->name)[0] == '/') {
|
if ((currsourceheader->require[i]->name)[0] == '/') {
|
||||||
/* requirement is a file, find who provides it */
|
/* requirement is a file, find who provides it */
|
||||||
@ -677,25 +676,31 @@ resolveFirstLevelSourceDependencies(struct configTag *ct, int archidx)
|
|||||||
provided->buildprovider=file->provider;
|
provided->buildprovider=file->provider;
|
||||||
provided->flags=0;
|
provided->flags=0;
|
||||||
logmsg(LOG_DEBUG,"file %s is a build provider for %s",currsourceheader->require[i]->name,currsourceheader->name);
|
logmsg(LOG_DEBUG,"file %s is a build provider for %s",currsourceheader->require[i]->name,currsourceheader->name);
|
||||||
} else {
|
|
||||||
scanheader=NULL;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* requirement is not a file, cross-check with provides */
|
/* requirement is not a file, cross-check with provides */
|
||||||
|
scanheader = ct->headerlist[archidx];
|
||||||
while (scanheader &&
|
while (scanheader) {
|
||||||
!checkRequireWithProvides(
|
if (checkRequireWithProvides(
|
||||||
currsourceheader->require[i]->name,
|
currsourceheader->require[i]->name,
|
||||||
scanheader)) scanheader = scanheader->next;
|
scanheader)) provided->numbuildproviders+=1;
|
||||||
if (scanheader) {
|
scanheader = scanheader->next;
|
||||||
provided->numbuildproviders=1;
|
}
|
||||||
provided->buildprovider=malloc(sizeof(struct headerList*));
|
if (provided->numbuildproviders > 0) {
|
||||||
provided->buildprovider[0]=scanheader;
|
provided->buildprovider = malloc(sizeof(struct headerList*) * provided->numbuildproviders);
|
||||||
provided->flags=0;
|
provided->flags = 0;
|
||||||
|
scanheader = ct->headerlist[archidx];
|
||||||
|
j = 0;
|
||||||
|
while (scanheader) {
|
||||||
|
if (checkRequireWithProvides(
|
||||||
|
currsourceheader->require[i]->name,
|
||||||
|
scanheader)) provided->buildprovider[j++] = scanheader;
|
||||||
|
scanheader = scanheader->next;
|
||||||
|
}
|
||||||
|
logmsg(LOG_DEBUG,"%s is a build provider for %s",provided->name,currsourceheader->name);
|
||||||
}
|
}
|
||||||
logmsg(LOG_DEBUG,"%s is a build provider for %s",provided->name,currsourceheader->name);
|
|
||||||
}
|
}
|
||||||
if (!scanheader) {
|
if (provided->numbuildproviders == 0) {
|
||||||
snprintf(warning,PATH_MAX,"missing build provider for %s",currsourceheader->require[i]->name);
|
snprintf(warning,PATH_MAX,"missing build provider for %s",currsourceheader->require[i]->name);
|
||||||
fprintf(stderr,"Warning: %s(source,%s): %s\n",
|
fprintf(stderr,"Warning: %s(source,%s): %s\n",
|
||||||
currsourceheader->name,
|
currsourceheader->name,
|
||||||
@ -703,17 +708,7 @@ resolveFirstLevelSourceDependencies(struct configTag *ct, int archidx)
|
|||||||
warning);
|
warning);
|
||||||
addWarning(currsourceheader,warning);
|
addWarning(currsourceheader,warning);
|
||||||
}
|
}
|
||||||
/* if (scanheader) {
|
//} else if (provided->numbuildproviders > 1) {
|
||||||
provided->numbuildproviders=1;
|
|
||||||
provided->buildprovider=malloc(sizeof(struct headerList*));
|
|
||||||
provided->buildprovider[0]=scanheader;
|
|
||||||
provided->flags=0;
|
|
||||||
} else {
|
|
||||||
snprintf(warning, PATH_MAX, "missing build provider for %s", currsourceheader->require[i]->name);
|
|
||||||
fprintf(stderr,"Warning: %s: %s\n",currsourceheader->name, warning);
|
|
||||||
addWarning(currsourceheader, warning);
|
|
||||||
}*/
|
|
||||||
} 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);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user