From: Kristian Høgsberg Date: Sun, 4 Nov 2007 04:58:25 +0000 (-0400) Subject: Don't reset yum parser state when finishing parsing rpm:entry. X-Git-Tag: 0.1~292 X-Git-Url: http://project.juiblex.co.uk/git/?a=commitdiff_plain;h=c22b5954287ade6426c61116d945f4d2e12e2236;p=razor.git Don't reset yum parser state when finishing parsing rpm:entry. This fixes the bug where each package on got on of each property type. --- diff --git a/import.c b/import.c index f291ef0..399926e 100644 --- a/import.c +++ b/import.c @@ -264,7 +264,13 @@ yum_end_element (void *data, const char *name) { struct yum_context *ctx = data; - ctx->state = YUM_STATE_BEGIN; + switch (ctx->state) { + case YUM_STATE_PACKAGE_NAME: + case YUM_STATE_FILE: + ctx->state = YUM_STATE_BEGIN; + break; + } + if (strcmp(name, "package") == 0) razor_importer_finish_package(ctx->importer); else if (strcmp(name, "file") == 0)