[softwaremgmt] XML output for zypper
Hi there! zypper -x (--xmlout) is almost done. The main features (currently in svn, to be in zypper-0.10.2) include: * all output in XML: info, warning, error messages, progress/download progress, prompts, * uniquely identified user dialogs (prompts) * enumerated possible dialog answers (comming soon: prompt help) * query command results as xml data - list-updates (obsoletes the xu command) uses the established update info xml structure from zypp-check-patches/zypper xu - repos - search (TODO) - patches (TODO) - info (TODO) * other special information as xml data - install summary * common types of output (messages, progress) are written using classes derived from Out class (OutNormal, OutXML) so this type of output can easily be changed/extended, new class can be added (e.g. OutColored). Output examples attached. I have left the <update-status> subtree compatible with zypp-check-patches, but i've changed the rest of the xml written by 'zypper --terse xu' [2] (used by the updater applets) a bit as i believe it is only used by the applets so far, which we can adapt. There is an RNC scheme at [0], which will get installed to /usr/share/zypper/$somewhere/xmlout.rnc. I will also update [2] http://en.opensuse.org/Standards/Zypper_Xml after the code freeze. Also there is prompt.h header file at [1] with an enum of the prompt IDs and their description (TODO) which i plan to get installed into /usr/include/zypper/prompt.h. As for zypper commands and options: - I would like to drop the xu command in favor of 'zypper -x lu -t package -t patch'. - Also, i'd like to use the --terse option for other type of machine-readable output (like zypper repos printing the table without header and decoration). For 11.0 it should be just ignored (provided only for rug-compatibility). IMO we can afford dropping these, as they were only used by the updater applets so far (probably :O). XML input is not implemented yet, but eventually will be. So go ahead and play with it, feedback is welcome! Cheers, jano [0] http://svn.opensuse.org/svn/zypp/trunk/zypper/src/output/xmlout.rnc [1] http://svn.opensuse.org/svn/zypp/trunk/zypper/src/output/prompt.h [2] http://en.opensuse.org/Standards/Zypper_Xml
participants (1)
-
Jan Kupec