headerlist: generateHeaderList (repodata): process upstream packages first to fix following provder checks for updated packages
This commit is contained in:
parent
4891e1f7ec
commit
56677044b8
@ -457,9 +457,7 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx)
|
||||
continue;
|
||||
}
|
||||
// currheader->require.resolved = malloc(sizeof(struct providedList*)*currheader->requirecount);
|
||||
|
||||
for (i = 0; i < currheader->requirecount; i++) {
|
||||
|
||||
if (!strncmp("executable(",currheader->require[i]->name,11)) {
|
||||
/* dynamic requirement for executable file */
|
||||
/* fprintf(stderr,"Warning: skipping unhandled requirement %s for package %s\n",
|
||||
@ -594,20 +592,10 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx)
|
||||
if (provided->numproviders > 0) {
|
||||
if (strcmp(currheader->require[i]->version,"") &&
|
||||
(currheader->require[i]->flags & (RPMSENSE_LESS|RPMSENSE_GREATER|RPMSENSE_EQUAL))) {
|
||||
|
||||
found = 0;
|
||||
foundprovider = -1;
|
||||
foundupstreamprovider = 0;
|
||||
for (j = 0; j < provided->numproviders; j++) {
|
||||
/* 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;
|
||||
foundupstreamprovider = foundprovider;
|
||||
foundprovider = -1;
|
||||
}
|
||||
if (!strcmp(provided->version[j],"")) {
|
||||
/* provider with no version; assume ok */
|
||||
found += 1;
|
||||
@ -623,6 +611,15 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx)
|
||||
foundprovider = j;
|
||||
}
|
||||
}
|
||||
/* 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;
|
||||
foundupstreamprovider = foundprovider;
|
||||
foundprovider = -1;
|
||||
}
|
||||
} /* for */
|
||||
if ((found >= 1) && (!foundupstreamprovider) &&
|
||||
(currheader->altrepository != 0) &&
|
||||
|
@ -1554,6 +1554,7 @@ char* advanceXMLPackageNode(xmlNode **primary_node, xmlNode **filelists_node) {
|
||||
(nextname[0] == '\0' || strcmp(nextname, currnames[i]) >= 0)) {
|
||||
strncpy(nextname, currnames[i], bufsize);
|
||||
altidx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user