From a965fb452190bb4cfbb98dc1466a4520db576529 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sun, 25 Nov 2007 03:37:25 +0000 Subject: [PATCH] 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. --- tools/repo_rpmmd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/repo_rpmmd.c b/tools/repo_rpmmd.c index 877f793..4eb9cc0 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); -- 2.7.4