solver: improve assert error messages

Print name of package and void double "ERROR"
cute-signatures
Natanael Copa 2012-10-03 09:16:28 +02:00
parent 00958d9207
commit 081155c438
1 changed files with 3 additions and 2 deletions

View File

@ -927,11 +927,12 @@ static int next_branch(struct apk_solver_state *ss)
#ifdef DEBUG_CHECKS #ifdef DEBUG_CHECKS
ASSERT(cmpscore(&d->saved_score, &ss->score) == 0, ASSERT(cmpscore(&d->saved_score, &ss->score) == 0,
"ERROR! saved_score "SCORE_FMT" != score "SCORE_FMT, "Saved_score "SCORE_FMT" != score "SCORE_FMT,
SCORE_PRINTF(&d->saved_score), SCORE_PRINTF(&d->saved_score),
SCORE_PRINTF(&ss->score)); SCORE_PRINTF(&ss->score));
ASSERT(d->saved_requirers == name->ss.requirers, ASSERT(d->saved_requirers == name->ss.requirers,
"ERROR! requirers not restored between decisions"); "Requirers not restored between decisions (%s)",
name->name);
#endif #endif
if (backup_until >= ss->num_decisions && if (backup_until >= ss->num_decisions &&