Repository navigation
Commit 45c01f7
committed
tatt: don't repeat a USE combination already emitted
The replay loop counted runs produced, not distinct combinations. But
find_constraint_satisfaction returns the same solution set on every pass,
only the flags kept out of the problem are redrawn, so a package with
little to redraw simply replayed itself. -u 6 on dev-libs/nspr, whose only
free flag is debug, emitted 6 runs covering its 2 real combinations: four
byte-identical rebuilds of something already tested. Same for x11-misc/sddm.
Track the combinations already emitted, keyed on the enabled IUSE flags
rather than the rendered string, whose set iteration order is no identity,
and skip repeats.
That alone would spin forever once the space is exhausted, as the old exit
was reaching --use-combos and nothing is being produced any more, so bound
the search by what a replay can actually reach: the solver's own solution
count, doubled per redrawn flag. nspr now stops at 2 rather than at an
arbitrary cutoff.
That bound over-estimates when REQUIRED_USE names a flag outside IUSE, as
distinct solutions then collapse into one combination and it is never
reached, so keep a cap on consecutive passes that turn up nothing new. It is
sampling, so a package can occasionally come up one or two short of its full
space, over 200 seeds on media-libs/opusfile (16 combinations) 20 passes
reached all 16 in 191 of them, never below 15, but it never repeats.
Relates: #164
Relates: #149 (comment)
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>1 parent 83f0e44 commit 45c01f7
2 files changed
Lines changed: 43 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
217 | 221 | | |
218 | 222 | | |
219 | 223 | | |
| |||
388 | 392 | | |
389 | 393 | | |
390 | 394 | | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
391 | 404 | | |
392 | 405 | | |
393 | 406 | | |
394 | 407 | | |
395 | 408 | | |
396 | 409 | | |
397 | 410 | | |
398 | | - | |
| 411 | + | |
399 | 412 | | |
400 | 413 | | |
401 | 414 | | |
402 | 415 | | |
403 | 416 | | |
404 | | - | |
405 | | - | |
406 | | - | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
407 | 424 | | |
408 | 425 | | |
409 | 426 | | |
410 | 427 | | |
411 | 428 | | |
412 | 429 | | |
413 | 430 | | |
414 | | - | |
| 431 | + | |
415 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
416 | 440 | | |
417 | 441 | | |
418 | 442 | | |
| |||
422 | 446 | | |
423 | 447 | | |
424 | 448 | | |
425 | | - | |
426 | | - | |
| 449 | + | |
427 | 450 | | |
428 | | - | |
| 451 | + | |
429 | 452 | | |
430 | 453 | | |
431 | 454 | | |
432 | 455 | | |
433 | 456 | | |
434 | 457 | | |
435 | | - | |
436 | | - | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
437 | 466 | | |
438 | 467 | | |
439 | 468 | | |
| |||
0 commit comments