Restore (?) warning message about needed requirements only in same repository

This commit is contained in:
Silvan Calarco 2013-10-07 15:24:11 +02:00
parent 4a04c87fdf
commit 7a727bfa46

View File

@ -409,10 +409,10 @@ handleObsoletedPackages(struct configTag *ct, int archidx)
static int
resolveFirstLevelDependencies(struct configTag *ct, int archidx)
{
struct headerList *currheader, *scanheader, **newprovider, *foundverprovider;
struct headerList *currheader, *scanheader, **newprovider;
struct providedList *provided;
struct fileTree *file;
int i,j,k,found;
int i,j,k,found,foundprovider;
char warning[PATH_MAX];
char ** newversion;
@ -606,30 +606,45 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx)
(currheader->require[i]->flags & (RPMSENSE_LESS|RPMSENSE_GREATER|RPMSENSE_EQUAL))) {
found = 0;
foundverprovider = NULL;
foundprovider = -1;
for (j = 0; j < provided->numproviders; j++) {
if (foundverprovider &&
!strcmp(foundverprovider->name,provided->provider[j]->name) &&
foundverprovider->altrepository != provided->provider[j]->altrepository) {
found = 0;
foundverprovider = NULL;
/* updated packages: ignore check with upstream package */
if ((foundprovider >= 0) &&
!strcmp(provided->provider[foundprovider]->name,provided->provider[j]->name) &&
provided->provider[foundprovider]->altrepository != provided->provider[j]->altrepository) {
found -= 1;
foundprovider = -1;
}
if (!strcmp(provided->version[j],"")) {
/* provider with no version; assume ok */
found = 1;
foundverprovider=provided->provider[j];
found += 1;
foundprovider = j;
} else {
if (checkVersionWithFlags(
currheader->require[i]->version,
currheader->require[i]->flags,
provided->version[j])) {
found = 1;
foundverprovider=provided->provider[j];
found += 1;
foundprovider = j;
}
}
} /* for */
if (!found) {
if ((found >= 1) &&
(currheader->altrepository != 0) &&
(provided->provider[foundprovider]->sourceheader != currheader->sourceheader) &&
(provided->provider[foundprovider]->altrepository == currheader->altrepository)) {
snprintf(warning, PATH_MAX, "%s(%s,%s) requires %s(%s,%s) because it only provides %s = %s",
currheader->name,
currheader->arch,
ct->repository[currheader->altrepository]->tag,
provided->provider[foundprovider]->name,
provided->provider[foundprovider]->arch,
ct->repository[provided->provider[foundprovider]->altrepository]->tag,
provided->name,
provided->version[foundprovider]);
logmsg(LOG_WARNING,"%s", warning);
addWarning(currheader->sourceheader, warning);
} else if (!found) {
for (j = 0; j < provided->numproviders; j++) {
if (!checkVersionWithFlags(
currheader->require[i]->version,