Don't reset yum parser state when finishing parsing rpm:entry.
authorKristian Høgsberg <krh@redhat.com>
Sun, 4 Nov 2007 04:58:25 +0000 (00:58 -0400)
committerKristian Høgsberg <krh@redhat.com>
Sun, 4 Nov 2007 04:58:25 +0000 (00:58 -0400)
This fixes the bug where each package on got on of each property type.

import.c

index f291ef0..399926e 100644 (file)
--- 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)