1.1 --- a/yum.c Sun Jun 08 17:11:41 2008 -0400
1.2 +++ b/yum.c Sun Jun 15 18:16:20 2008 -0400
1.3 @@ -39,6 +39,8 @@
1.4 YUM_STATE_PACKAGE_ARCH,
1.5 YUM_STATE_SUMMARY,
1.6 YUM_STATE_DESCRIPTION,
1.7 + YUM_STATE_URL,
1.8 + YUM_STATE_LICENSE,
1.9 YUM_STATE_CHECKSUM,
1.10 YUM_STATE_REQUIRES,
1.11 YUM_STATE_PROVIDES,
1.12 @@ -54,7 +56,8 @@
1.13
1.14 struct razor_importer *importer;
1.15 struct import_property_context *current_property_context;
1.16 - char name[256], arch[64], summary[512], description[4096], buffer[512], *p;
1.17 + char name[256], arch[64], summary[512], description[4096];
1.18 + char url[256], license[64], buffer[512], *p;
1.19 char pkgid[128];
1.20 int state;
1.21 };
1.22 @@ -121,9 +124,15 @@
1.23 } else if (strcmp(name, "description") == 0) {
1.24 ctx->p = ctx->description;
1.25 ctx->state = YUM_STATE_DESCRIPTION;
1.26 + } else if (strcmp(name, "url") == 0) {
1.27 + ctx->p = ctx->url;
1.28 + ctx->state = YUM_STATE_URL;
1.29 } else if (strcmp(name, "checksum") == 0) {
1.30 ctx->p = ctx->pkgid;
1.31 ctx->state = YUM_STATE_CHECKSUM;
1.32 + } else if (strcmp(name, "rpm:license") == 0) {
1.33 + ctx->p = ctx->license;
1.34 + ctx->state = YUM_STATE_LICENSE;
1.35 } else if (strcmp(name, "rpm:requires") == 0) {
1.36 ctx->state = YUM_STATE_REQUIRES;
1.37 } else if (strcmp(name, "rpm:provides") == 0) {
1.38 @@ -198,6 +207,8 @@
1.39 case YUM_STATE_PACKAGE_ARCH:
1.40 case YUM_STATE_SUMMARY:
1.41 case YUM_STATE_DESCRIPTION:
1.42 + case YUM_STATE_URL:
1.43 + case YUM_STATE_LICENSE:
1.44 case YUM_STATE_CHECKSUM:
1.45 case YUM_STATE_FILE:
1.46 ctx->state = YUM_STATE_BEGIN;
1.47 @@ -205,7 +216,9 @@
1.48 }
1.49
1.50 if (strcmp(name, "package") == 0) {
1.51 - razor_importer_add_details(ctx->importer, ctx->summary, ctx->description);
1.52 + razor_importer_add_details(ctx->importer, ctx->summary,
1.53 + ctx->description, ctx->url,
1.54 + ctx->license);
1.55
1.56 XML_StopParser(ctx->current_parser, XML_TRUE);
1.57 ctx->current_parser = ctx->filelists_parser;
1.58 @@ -222,6 +235,8 @@
1.59 case YUM_STATE_PACKAGE_ARCH:
1.60 case YUM_STATE_SUMMARY:
1.61 case YUM_STATE_DESCRIPTION:
1.62 + case YUM_STATE_URL:
1.63 + case YUM_STATE_LICENSE:
1.64 case YUM_STATE_CHECKSUM:
1.65 case YUM_STATE_FILE:
1.66 memcpy(ctx->p, s, len);