openSUSE:Standards Zypper Xml

Jump to: navigation, search
Geeko-white.png
11.1
This specification is relevant for openSUSE 11.1 and later

General

Since 10.3 opensuse-updater uses zypper to check for available updates and for their installation. For that communication XML used and the Zypp Updates Status XML has been extended.

The goal is to have all of zypper's output available also in XML for processing in scripts and applications.

Schema

The structure of the XML is defined in an RNC schema in xmlout.rnc.

Description of Elements

Every XML output starts with

<?xml version='1.0'?>
<stream>

and ends with (important, because some XML Parsers will fail to parse the document otherwise)

</stream>


and contains some of the following tags.

Progress

Zypper can provide progress information e.g. while checking for software updates or installing software. Of Course XML-output needs to be parsed "realtime" while running zypper to use the progress information.It might be possible that different progresses happen at the same time. The id property can be used to distinguish them. A progress of type "percentage" can contain obviously values form 0 to 100. The type "done" completes a finished progress.

Example:

<progress id="read-installed-packages" type="percentage" value="25" name="Reading installed packages"/>
<progress id="read-installed-packages" type="percentage" value="50" name="Reading installed packages"/>
<progress id="read-installed-packages" type="percentage" value="100" name="Reading installed packages"/>
<progress id="read-installed-packages" type="done" name=""/>


Update List

The update entity contains information about available software updates. The update tag is nested in an update-list. Following attributes are used for the update tag:

name Update name
edition Update edition
category Update category
pkgmanager Whether the update affects the update stack itself
restart Whether a reboot is needed
interactive Whether the update need user interaction
kind Kind of the update: patch or package
summary Update summery
description Update description
license License text that needs to be confirmed (empty=No license)
source Repository the update comes from


Example:

<update name="update-test-optional" edition="2627-0" category="optional" pkgmanager="false" restart="false" interactive="false" kind="patch" >
 <summary>Test update of update-test-optional  </summary>
 <description>Test update of update-test-optional</description>
 <license></license>
 <source url="ftp://ftp.suse.com/pub/suse/update/10.3" alias="103update"/>
</update>



Message

Zypper provides messages using the message tag. Three different types are allowed: info, warning and error.

Example:

<message type="warning">One of installed patches requires reboot of your machine. Please, do it as soon as possible.</message>


Appletinfo

A special tag is appletinfo that is used to tell the updater the current status. The only status is "no-update-repositories" that indicates that zypper doesn't know any update repositories.

Example:

<appletinfo status="no-update-repositories"/>