1.1 --- a/yum.c Wed Apr 09 21:14:36 2008 -0400
1.2 +++ b/yum.c Sun Jun 08 17:11:41 2008 -0400
1.3 @@ -37,6 +37,8 @@
1.4 YUM_STATE_BEGIN,
1.5 YUM_STATE_PACKAGE_NAME,
1.6 YUM_STATE_PACKAGE_ARCH,
1.7 + YUM_STATE_SUMMARY,
1.8 + YUM_STATE_DESCRIPTION,
1.9 YUM_STATE_CHECKSUM,
1.10 YUM_STATE_REQUIRES,
1.11 YUM_STATE_PROVIDES,
1.12 @@ -52,7 +54,7 @@
1.13
1.14 struct razor_importer *importer;
1.15 struct import_property_context *current_property_context;
1.16 - char name[256], arch[64], buffer[512], *p;
1.17 + char name[256], arch[64], summary[512], description[4096], buffer[512], *p;
1.18 char pkgid[128];
1.19 int state;
1.20 };
1.21 @@ -113,6 +115,12 @@
1.22 razor_build_evr(buffer, sizeof buffer, epoch, version, release);
1.23 razor_importer_begin_package(ctx->importer,
1.24 ctx->name, buffer, ctx->arch);
1.25 + } else if (strcmp(name, "summary") == 0) {
1.26 + ctx->p = ctx->summary;
1.27 + ctx->state = YUM_STATE_SUMMARY;
1.28 + } else if (strcmp(name, "description") == 0) {
1.29 + ctx->p = ctx->description;
1.30 + ctx->state = YUM_STATE_DESCRIPTION;
1.31 } else if (strcmp(name, "checksum") == 0) {
1.32 ctx->p = ctx->pkgid;
1.33 ctx->state = YUM_STATE_CHECKSUM;
1.34 @@ -188,6 +196,8 @@
1.35 switch (ctx->state) {
1.36 case YUM_STATE_PACKAGE_NAME:
1.37 case YUM_STATE_PACKAGE_ARCH:
1.38 + case YUM_STATE_SUMMARY:
1.39 + case YUM_STATE_DESCRIPTION:
1.40 case YUM_STATE_CHECKSUM:
1.41 case YUM_STATE_FILE:
1.42 ctx->state = YUM_STATE_BEGIN;
1.43 @@ -195,6 +205,8 @@
1.44 }
1.45
1.46 if (strcmp(name, "package") == 0) {
1.47 + razor_importer_add_details(ctx->importer, ctx->summary, ctx->description);
1.48 +
1.49 XML_StopParser(ctx->current_parser, XML_TRUE);
1.50 ctx->current_parser = ctx->filelists_parser;
1.51 }
1.52 @@ -208,6 +220,8 @@
1.53 switch (ctx->state) {
1.54 case YUM_STATE_PACKAGE_NAME:
1.55 case YUM_STATE_PACKAGE_ARCH:
1.56 + case YUM_STATE_SUMMARY:
1.57 + case YUM_STATE_DESCRIPTION:
1.58 case YUM_STATE_CHECKSUM:
1.59 case YUM_STATE_FILE:
1.60 memcpy(ctx->p, s, len);