summaryrefslogtreecommitdiff
path: root/ext/repo_updateinfoxml.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-09-10 15:38:51 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-09-10 15:38:51 +0900
commitf078975d65d0cace665590f3cf60025e6f2c7a0a (patch)
treed5c4e22f5738c33a4b49ec6517e814297b015393 /ext/repo_updateinfoxml.c
parentd4334b3ee7ce4f5c736d3bda979388a87ba7aef3 (diff)
downloadlibsolv-f078975d65d0cace665590f3cf60025e6f2c7a0a.tar.gz
libsolv-f078975d65d0cace665590f3cf60025e6f2c7a0a.tar.bz2
libsolv-f078975d65d0cace665590f3cf60025e6f2c7a0a.zip
Imported Upstream version 0.7.4upstream/0.7.4
Diffstat (limited to 'ext/repo_updateinfoxml.c')
-rw-r--r--ext/repo_updateinfoxml.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/ext/repo_updateinfoxml.c b/ext/repo_updateinfoxml.c
index ff84d32..f375727 100644
--- a/ext/repo_updateinfoxml.c
+++ b/ext/repo_updateinfoxml.c
@@ -37,6 +37,7 @@
* <pkglist>
* <collection short="F8">
* <name>Fedora 8</name>
+ * <module name="pki-deps" stream="10.6" version="20181019123559" context="9edba152" arch="x86_64"/>
* <package arch="ppc64" name="imlib-debuginfo" release="6.fc8" src="http://download.fedoraproject.org/pub/fedora/linux/updates/8/ppc64/imlib-debuginfo-1.9.15-6.fc8.ppc64.rpm" version="1.9.15">
* <filename>imlib-debuginfo-1.9.15-6.fc8.ppc64.rpm</filename>
* <reboot_suggested>True</reboot_suggested>
@@ -70,6 +71,7 @@ enum state {
STATE_RELOGIN,
STATE_RIGHTS,
STATE_SEVERITY,
+ STATE_MODULE,
NUMSTATES
};
@@ -92,6 +94,7 @@ static struct solv_xmlparser_element stateswitches[] = {
{ STATE_PKGLIST, "collection", STATE_COLLECTION, 0 },
{ STATE_COLLECTION, "name", STATE_NAME, 1 },
{ STATE_COLLECTION, "package", STATE_PACKAGE, 0 },
+ { STATE_COLLECTION, "module", STATE_MODULE, 0 },
{ STATE_PACKAGE, "filename", STATE_FILENAME, 1 },
{ STATE_PACKAGE, "reboot_suggested",STATE_REBOOT, 1 },
{ STATE_PACKAGE, "restart_suggested",STATE_RESTART, 1 },
@@ -321,6 +324,38 @@ startElement(struct solv_xmlparser *xmlp, int state, const char *name, const cha
repodata_set_id(pd->data, pd->collhandle, UPDATE_COLLECTION_ARCH, a);
break;
}
+ case STATE_MODULE:
+ {
+ const char *name = 0, *stream = 0, *version = 0, *context = 0, *arch = 0;
+ Id module_handle;
+
+ for (; *atts; atts += 2)
+ {
+ if (!strcmp(*atts, "arch"))
+ arch = atts[1];
+ else if (!strcmp(*atts, "name"))
+ name = atts[1];
+ else if (!strcmp(*atts, "stream"))
+ stream = atts[1];
+ else if (!strcmp(*atts, "version"))
+ version = atts[1];
+ else if (!strcmp(*atts, "context"))
+ context = atts[1];
+ }
+ module_handle = repodata_new_handle(pd->data);
+ if (name)
+ repodata_set_poolstr(pd->data, module_handle, UPDATE_MODULE_NAME, name);
+ if (stream)
+ repodata_set_poolstr(pd->data, module_handle, UPDATE_MODULE_STREAM, stream);
+ if (version)
+ repodata_set_poolstr(pd->data, module_handle, UPDATE_MODULE_VERSION, version);
+ if (context)
+ repodata_set_poolstr(pd->data, module_handle, UPDATE_MODULE_CONTEXT, context);
+ if (arch)
+ repodata_set_poolstr(pd->data, module_handle, UPDATE_MODULE_ARCH, arch);
+ repodata_add_flexarray(pd->data, pd->handle, UPDATE_MODULE, module_handle);
+ break;
+ }
default:
break;