Commit 88887423f4aca28540e1fba8316401daed8ac468

Authored by Silvan Calarco
1 parent 21d596193d
Exists in master

Skip "debuginfo(build-id)" multiple provided element from obsolete checking

Showing 2 changed files with 8 additions and 7 deletions Side-by-side Diff

... ... @@ -249,12 +249,13 @@
249 249 struct headerList *currheader;
250 250  
251 251 while (prov) {
252   -
253   - if (prov->numproviders > OBSOLETE_MAX) {
254   - return 1;
255   - }
256   -
257   - if (prov->numproviders > 1) {
  252 + // Skip debuginfo(build-id) provides which would need very big multiple providers buffer size
  253 + if (prov->numproviders > 1 && (strncmp(prov->name, "debuginfo(build-id)", 20) < 0)) {
  254 + if (prov->numproviders > OBSOLETE_MAX) {
  255 + fprintf(stderr, "Error: %s has too many providers (%d > %d)\n",
  256 + prov->name, prov->numproviders, OBSOLETE_MAX);
  257 + return 1;
  258 + }
258 259 for (i = 0; i < prov->numproviders; i++) obs[i]=-1;
259 260 for (i = 0; i < prov->numproviders; i++)
260 261 for (j = 0; j < prov->provider[i]->obsoletecount; j++)
src/include/distromatic.h
... ... @@ -11,7 +11,7 @@
11 11 #define PACKAGE_BUGREPORT "silvan.calarco@mambasoft.it"
12 12  
13 13 #define ARCHS_MAX 5
14   -#define OBSOLETE_MAX 16384
  14 +#define OBSOLETE_MAX 1024
15 15 #define DEFAULT_ARCH "i586"
16 16 #define CONF_DEFAULTS_SECTION 1
17 17 #define CONF_REP_SECTION 0