summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Andres <ma@suse.de>2010-03-23 17:23:58 +0100
committerMichael Andres <ma@suse.de>2010-03-23 17:28:46 +0100
commit749bddfe53d59fedce57c77ec45cf1b2767b528a (patch)
tree396e95befee4aab296c2bdb540258ab591497def
parent565bc60f57a21f3bf650ec938b0056481005c2b0 (diff)
downloadlibsolv-749bddfe53d59fedce57c77ec45cf1b2767b528a.tar.gz
libsolv-749bddfe53d59fedce57c77ec45cf1b2767b528a.tar.bz2
libsolv-749bddfe53d59fedce57c77ec45cf1b2767b528a.zip
Parse an installed products <shortsummary> tag.
-rw-r--r--ext/repo_products.c7
1 files changed, 6 insertions, 1 deletions
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);