src/distromatic.c: partially revert a change in versioned deps check

This commit is contained in:
Silvan Calarco 2021-03-14 19:33:15 +01:00
parent b8feab5122
commit a4b7cd5412

View File

@ -1,7 +1,7 @@
/* /*
* distromatic - tool for RPM based repositories * distromatic - tool for RPM based repositories
* *
* Copyright (C) 2004-2020 by Silvan Calarco <silvan.calarco@mambasoft.it> * Copyright (C) 2004-2021 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com> * Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify it under * This program is free software; you can redistribute it and/or modify it under
@ -596,6 +596,14 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx)
foundprovider = -1; foundprovider = -1;
foundupstreamprovider = 0; foundupstreamprovider = 0;
for (j = 0; j < provided->numproviders; j++) { 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],"")) { if (!strcmp(provided->version[j],"")) {
/* provider with no version; assume ok */ /* provider with no version; assume ok */
found += 1; found += 1;
@ -611,15 +619,6 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx)
foundprovider = j; 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 */ } /* for */
if ((found >= 1) && (!foundupstreamprovider) && if ((found >= 1) && (!foundupstreamprovider) &&
(currheader->altrepository != 0) && (currheader->altrepository != 0) &&