Author: mlschroe Date: Thu Oct 16 00:50:33 2008 New Revision: 11373 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11373&view=rev Log: - make iterator work withj completely empty repos Modified: trunk/sat-solver/src/repodata.c Modified: trunk/sat-solver/src/repodata.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/repodata.c?rev=11373&r1=11372&r2=11373&view=diff ============================================================================== --- trunk/sat-solver/src/repodata.c (original) +++ trunk/sat-solver/src/repodata.c Thu Oct 16 00:50:33 2008 @@ -1047,7 +1047,11 @@ case di_enterrepodata: di_enterrepodata: if (di->repodataid >= 0) - di->data = di->repo->repodata + di->repodataid; + { + if (di->repodataid >= di->repo->nrepodata) + goto di_nextsolvable; + di->data = di->repo->repodata + di->repodataid; + } if (!maybe_load_repodata(di->data, di->keyname)) goto di_nextrepodata; di->dp = solvid2data(di->data, di->solvid, &schema); @@ -1102,7 +1106,7 @@ goto di_enterrepodata; /* FALLTHROUGH */ - case di_nextsolvable: + case di_nextsolvable: di_nextsolvable: if (!(di->flags & SEARCH_THISSOLVID)) { if (di->solvid < 0) -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org