firstLevelDependencies: don't report warnings for missing multiple providers when upstream satisfies it
This commit is contained in:
parent
40aa848d81
commit
16f350bdc4
@ -412,7 +412,7 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx)
|
|||||||
struct headerList *currheader, *scanheader, **newprovider;
|
struct headerList *currheader, *scanheader, **newprovider;
|
||||||
struct providedList *provided;
|
struct providedList *provided;
|
||||||
struct fileTree *file;
|
struct fileTree *file;
|
||||||
int i,j,k,found,foundprovider;
|
int i,j,k,found,foundprovider, foundupstreamprovider;
|
||||||
char warning[PATH_MAX];
|
char warning[PATH_MAX];
|
||||||
char ** newversion;
|
char ** newversion;
|
||||||
|
|
||||||
@ -607,17 +607,20 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx)
|
|||||||
|
|
||||||
found = 0;
|
found = 0;
|
||||||
foundprovider = -1;
|
foundprovider = -1;
|
||||||
|
foundupstreamprovider = 0;
|
||||||
for (j = 0; j < provided->numproviders; j++) {
|
for (j = 0; j < provided->numproviders; j++) {
|
||||||
/* updated packages: ignore check with upstream package */
|
/* updated packages: ignore check with upstream package */
|
||||||
if ((foundprovider >= 0) &&
|
if ((foundprovider >= 0) &&
|
||||||
!strcmp(provided->provider[foundprovider]->name,provided->provider[j]->name) &&
|
!strcmp(provided->provider[foundprovider]->name,provided->provider[j]->name) &&
|
||||||
provided->provider[foundprovider]->altrepository != provided->provider[j]->altrepository) {
|
provided->provider[foundprovider]->altrepository < provided->provider[j]->altrepository) {
|
||||||
found -= 1;
|
found -= 1;
|
||||||
|
foundupstreamprovider = foundprovider;
|
||||||
foundprovider = -1;
|
foundprovider = -1;
|
||||||
}
|
}
|
||||||
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;
|
||||||
|
foundupstreamprovider = foundprovider;
|
||||||
foundprovider = j;
|
foundprovider = j;
|
||||||
} else {
|
} else {
|
||||||
if (checkVersionWithFlags(
|
if (checkVersionWithFlags(
|
||||||
@ -625,16 +628,20 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx)
|
|||||||
currheader->require[i]->flags,
|
currheader->require[i]->flags,
|
||||||
provided->version[j])) {
|
provided->version[j])) {
|
||||||
found += 1;
|
found += 1;
|
||||||
|
foundupstreamprovider = foundprovider;
|
||||||
foundprovider = j;
|
foundprovider = j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*if (!strcmp(provided->name,"pkgconfig(gio-2.0)"))
|
||||||
|
printf("provided->name=pkgconfig(gio-2.0) found=%d foundprovider=%d foundupstreamprovider=%d provided->version[j]=%s\n",
|
||||||
|
found, foundprovider, foundupstreamprovider, provided->version[j]);*/
|
||||||
} /* for */
|
} /* for */
|
||||||
if ((found >= 1) &&
|
if ((found >= 1) && (!foundupstreamprovider) &&
|
||||||
(currheader->altrepository != 0) &&
|
(currheader->altrepository != 0) &&
|
||||||
(currheader->altrepository = ct->repository_level) &&
|
(currheader->altrepository = ct->repository_level) &&
|
||||||
(provided->provider[foundprovider]->sourceheader != currheader->sourceheader) &&
|
(provided->provider[foundprovider]->sourceheader != currheader->sourceheader) &&
|
||||||
(provided->provider[foundprovider]->altrepository == currheader->altrepository)) {
|
(provided->provider[foundprovider]->altrepository == currheader->altrepository)) {
|
||||||
snprintf(warning, PATH_MAX, "%s(%s,%s) requires %s(%s,%s) because it provides %s=%s",
|
snprintf(warning, PATH_MAX, "%s(%s,%s) requires %s(%s,%s) because it needs %s=%s",
|
||||||
currheader->name,
|
currheader->name,
|
||||||
currheader->arch,
|
currheader->arch,
|
||||||
ct->repository[currheader->altrepository]->tag,
|
ct->repository[currheader->altrepository]->tag,
|
||||||
@ -651,7 +658,7 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx)
|
|||||||
currheader->require[i]->version,
|
currheader->require[i]->version,
|
||||||
currheader->require[i]->flags,
|
currheader->require[i]->flags,
|
||||||
provided->version[j])) {
|
provided->version[j])) {
|
||||||
snprintf(warning, PATH_MAX, "%s = %s from %s(%s,%s) fails to provide %s ",
|
snprintf(warning, PATH_MAX, "%s=%s from %s(%s,%s) fails to provide %s",
|
||||||
provided->name,
|
provided->name,
|
||||||
provided->version[j],
|
provided->version[j],
|
||||||
provided->provider[j]->name,
|
provided->provider[j]->name,
|
||||||
@ -661,7 +668,7 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx)
|
|||||||
if (currheader->require[i]->flags & RPMSENSE_LESS) snprintf(&warning[strlen(warning)], PATH_MAX,"<");
|
if (currheader->require[i]->flags & RPMSENSE_LESS) snprintf(&warning[strlen(warning)], PATH_MAX,"<");
|
||||||
if (currheader->require[i]->flags & RPMSENSE_GREATER) snprintf(&warning[strlen(warning)], PATH_MAX, ">");
|
if (currheader->require[i]->flags & RPMSENSE_GREATER) snprintf(&warning[strlen(warning)], PATH_MAX, ">");
|
||||||
if (currheader->require[i]->flags & RPMSENSE_EQUAL) snprintf(&warning[strlen(warning)], PATH_MAX, "=");
|
if (currheader->require[i]->flags & RPMSENSE_EQUAL) snprintf(&warning[strlen(warning)], PATH_MAX, "=");
|
||||||
snprintf(&warning[strlen(warning)], PATH_MAX, " %s to %s(%s,%s)",
|
snprintf(&warning[strlen(warning)], PATH_MAX, "%s to %s(%s,%s)",
|
||||||
currheader->require[i]->version,
|
currheader->require[i]->version,
|
||||||
currheader->name,
|
currheader->name,
|
||||||
currheader->arch,
|
currheader->arch,
|
||||||
|
Loading…
Reference in New Issue
Block a user