diff --git a/src/distromatic.c b/src/distromatic.c index af641b8..91c1dbf 100644 --- a/src/distromatic.c +++ b/src/distromatic.c @@ -1,7 +1,7 @@ /* * distromatic - tool for RPM based repositories * - * Copyright (C) 2004-2020 by Silvan Calarco + * Copyright (C) 2004-2021 by Silvan Calarco * Copyright (C) 2006 by Davide Madrisan * * 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; 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; @@ -611,15 +619,6 @@ 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) &&