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