ACC SHELL
# !! still WORK IN PROGRESS (untill 11.1 freeze) !!
# namespace zypper
start = stream-element
stream-element =
element stream {
(
# common stuff (progress, messages, prompts, status)
progress-elements* | download-progress-elements* | message-element* | prompt-element* |
# special stuff (updates list, installation summary, search output, info)
update-status-element* | # for zypper list-updates
install-summary-element* | # for zypper install/remove/update
repo-list-element? | # for zypper repos
service-list-element? |
selectable-list-element? | # for zypper search
selectable-info-element? | # for zypper info
# random text can appear between tags - this text should be ignored
text
)+
}
progress-elements = ( progress-element | progress-done )
progress-element =
element progress {
attribute id { xsd:string },
attribute name { xsd:string },
attribute value { xsd:integer }? # missing value means an 'is alive' notification
}
progress-done =
element progress {
attribute id { xsd:string },
attribute name { xsd:string },
attribute done { xsd:boolean } # 0 on success, 1 on error
}
download-progress-elements = ( download-progress-element | download-progress-done )
download-progress-element =
element download {
attribute url { xsd:string },
attribute percent { xsd:integer },
attribute rate { xsd:integer } # download rate in bytes per second
}
download-progress-done =
element download {
attribute url { xsd:string },
attribute rate { xsd:integer }, # download rate in bytes per second
attribute done { xsd:boolean } # 0 on success, 1 on error
}
message-element =
element message {
attribute type { "info" | "warning" | "error" }, # considering yet another type "result", maybe a separate <result> element
text
}
prompt-element =
element prompt {
attribute id { xsd:integer },
element description { text },
element text { text },
element option {
attribute default { xsd:boolean }?,
attribute value { xsd:string },
attribute desc { xsd:string }?
}*
}
update-status-element =
element update-status {
attribute version {xsd:string},
element update-list { ( patch-update | other-update )* }
}
update-commons =
attribute name { xsd:string },
attribute edition { xsd:string },
element summary { text },
element description { text },
element license { text },
element source { # repository
attribute url { xsd:anyURI },
attribute alias { xsd:string }
}
other-update =
element update {
update-commons,
attribute kind { "package" | "pattern" | "product" }
}
patch-update =
element update {
update-commons,
attribute kind { "patch" },
attribute category { xsd:string }?, # patch category (security, recommended, ...)
attribute pkgmanager { xsd:boolean }, # affect package management?
attribute restart { xsd:boolean }, # needs restart of the machine?
attribute interactive { xsd:boolean } # needs user interaction?
}
solvable-element =
element solvable {
attribute type { "package" | "patch" | "pattern" | "product" },
attribute name { xsd:string },
attribute edition { xsd:string }, # target edition
attribute edition-old { xsd:string }?, # currently installed version in case of upgrade
attribute arch { xsd:string },
attribute arch-old { xsd:string }?, # currently installed architecture
attribute summary { xsd:string }?,
text?
}
selectable-element =
element selectable {
solvable-element+
}
install-summary-element =
element install-summary {
attribute download-size { xsd:integer }, # download size in bytes
attribute space-usage-diff { xsd:integer }, # used space before vs. after install difference in bytes
(
element to-install { solvable-element+ } |
element to-remove { solvable-element+ } |
element to-upgrade { solvable-element+ } |
element to-downgrade { solvable-element+ } |
element to-upgrade-change-arch { solvable-element+ } |
element to-downgrade-change-arch { solvable-element+ } |
element to-reinstall { solvable-element+ } |
element to-change-arch { solvable-element+ }
)*
}
repo-element =
element repo {
attribute alias { xsd:string },
attribute name { xsd:string }?,
attribute type { xsd:string }?,
attribute enabled { xsd:boolean }?,
attribute autorefresh { xsd:boolean }?,
attribute gpgcheck { xsd:boolean }?,
attribute gpgkey { xsd:anyURI }?,
attribute mirrorlist { xsd:anyURI }?,
element url { xsd:anyURI }+
}
repo-list-element =
element repo-list {
repo-element*
}
service-list-element =
element service-list {
element service {
attribute alias { xsd:string },
attribute name { xsd:string }?,
attribute enabled { xsd:boolean }?,
attribute autorefresh { xsd:boolean }?,
attribute url { xsd:anyURI },
attribute type { xsd:string }?,
repo-element*
}*,
repo-element*
}
selectable-list-element =
element selectable-list {
selectable-element*
}
selectable-info-element =
element selectable-info {
common-selectable-info &
(
package-selectable-info |
patch-selectable-info
#pattern-selectable-info |
#product-selectable-info
)
}
# TODO
common-selectable-info =
attribute installed { xsd:boolean },
solvable-element+
# TODO
package-selectable-info =
attribute status { "up-to-date" | "out-of-date" }
# TODO
patch-selectable-info =
attribute status {
"installed" | "not-installed" | "not-applicable" | "no-longer-applicable" |
"applied" | "not-needed" | "broken" | "needed"
}
ACC SHELL 2018