From: Michael Matz Date: Sun, 25 Nov 2007 03:37:25 +0000 (+0000) Subject: Advancing to the next solvable needs to happen a posteriori. Without X-Git-Tag: BASE-SuSE-Code-12_1-Branch~308^2~785 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a965fb452190bb4cfbb98dc1466a4520db576529;p=thirdparty%2Flibsolv.git Advancing to the next solvable needs to happen a posteriori. Without this we end up with the first solvable being , and we miss the last package. --- diff --git a/tools/repo_rpmmd.c b/tools/repo_rpmmd.c index 877f7935..4eb9cc0d 100644 --- a/tools/repo_rpmmd.c +++ b/tools/repo_rpmmd.c @@ -280,12 +280,7 @@ startElement(void *userData, const char *name, const char **atts) } break; case STATE_PACKAGE: - if (pd->numpacks > 0) - { - pd->numpacks--; - pd->solvable++; - } - else + if (pd->numpacks == 0) pd->solvable = pool_id2solvable(pool, repo_add_solvable(pd->repo)); #if 0 fprintf(stderr, "package #%d\n", pd->solvable - pool->solvables); @@ -377,6 +372,11 @@ endElement(void *userData, const char *name) if (s->arch != ARCH_SRC && s->arch != ARCH_NOSRC) s->provides = repo_addid_dep(pd->repo, s->provides, rel2id(pool, s->name, s->evr, REL_EQ, 1), 0); s->supplements = repo_fix_legacy(pd->repo, s->provides, s->supplements); + if (pd->numpacks > 0) + { + pd->numpacks--; + pd->solvable++; + } break; case STATE_NAME: s->name = str2id(pool, pd->content, 1);