summaryrefslogtreecommitdiff
path: root/ext/repo_updateinfoxml.c
diff options
context:
space:
mode:
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;