From 749bddfe53d59fedce57c77ec45cf1b2767b528a Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Tue, 23 Mar 2010 17:23:58 +0100 Subject: [PATCH] Parse an installed products tag. --- ext/repo_products.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/repo_products.c b/ext/repo_products.c index b5e8b96..56e2733 100644 --- a/ext/repo_products.c +++ b/ext/repo_products.c @@ -45,6 +45,7 @@ enum state { STATE_RELEASE, // 5 STATE_ARCH, // 6 STATE_SUMMARY, // 7 + STATE_SHORTSUMMARY, STATE_DESCRIPTION, // 8 STATE_UPDATEREPOKEY, // 9 should go away STATE_CPEID, // 9 @@ -77,6 +78,7 @@ static struct stateswitch stateswitches[] = { { STATE_PRODUCT, "arch", STATE_ARCH, 1 }, { STATE_PRODUCT, "productline", STATE_PRODUCTLINE, 1 }, { STATE_PRODUCT, "summary", STATE_SUMMARY, 1 }, + { STATE_PRODUCT, "shortsummary", STATE_SHORTSUMMARY, 1 }, { STATE_PRODUCT, "description", STATE_DESCRIPTION, 1 }, { STATE_PRODUCT, "register", STATE_REGISTER, 0 }, { STATE_PRODUCT, "urls", STATE_URLS, 0 }, @@ -324,6 +326,9 @@ endElement(void *userData, const char *name) repodata_set_str(pd->data, pd->handle, langtag(pd, SOLVABLE_SUMMARY, pd->tmplang), pd->content); pd->tmplang = sat_free((void *)pd->tmplang); break; + case STATE_SHORTSUMMARY: + repodata_set_str(pd->data, pd->handle, PRODUCT_SHORTLABEL, pd->content); + break; case STATE_DESCRIPTION: repodata_set_str(pd->data, pd->handle, langtag(pd, SOLVABLE_DESCRIPTION, pd->tmplang), pd->content ); pd->tmplang = sat_free((void *)pd->tmplang); @@ -535,7 +540,7 @@ repo_add_products(Repo *repo, const char *proddir, const char *root, int flags) join_freemem(); return; } - + /* code11 didn't work, try -release files parsing */ fullpath = root ? join2(root, "", "/etc") : "/etc"; dir = opendir(fullpath); -- 2.34.1