| 1 | <?xml version="1.0" encoding="UTF-8"?>
|
|---|
| 2 | <!--
|
|---|
| 3 | Comps file Relax-NG Schema
|
|---|
| 4 |
|
|---|
| 5 | © 2006 Nicolas Mailhot <nim at fedoraproject dot org>
|
|---|
| 6 |
|
|---|
| 7 | TODO: re-add namespace to this file
|
|---|
| 8 | use that namespace to comps.xml files
|
|---|
| 9 | create grammar for comps.xml.in
|
|---|
| 10 | add more documentation for comps elements
|
|---|
| 11 | -->
|
|---|
| 12 | <grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
|---|
| 13 | xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
|
|---|
| 14 | datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|---|
| 15 | <start>
|
|---|
| 16 | <ref name="comps"/>
|
|---|
| 17 | </start>
|
|---|
| 18 | <define name="comps">
|
|---|
| 19 | <element name="comps">
|
|---|
| 20 | <oneOrMore>
|
|---|
| 21 | <ref name="group"/>
|
|---|
| 22 | </oneOrMore>
|
|---|
| 23 | <zeroOrMore>
|
|---|
| 24 | <ref name="category"/>
|
|---|
| 25 | </zeroOrMore>
|
|---|
| 26 | <optional>
|
|---|
| 27 | <interleave><!-- We don't care what order these are in -->
|
|---|
| 28 | <ref name="whiteout"/>
|
|---|
| 29 | <ref name="blacklist"/>
|
|---|
| 30 | </interleave>
|
|---|
| 31 | </optional>
|
|---|
| 32 | </element>
|
|---|
| 33 | </define>
|
|---|
| 34 | <define name="group">
|
|---|
| 35 | <element name="group">
|
|---|
| 36 | <!-- Example documentation. Please add more. -->
|
|---|
| 37 | <a:documentation>This defines a package group.</a:documentation>
|
|---|
| 38 | <interleave>
|
|---|
| 39 | <ref name="id"/>
|
|---|
| 40 | <element name="default" a:defaultValue="true">
|
|---|
| 41 | <a:documentation>Should the group be enabled by default?</a:documentation>
|
|---|
| 42 | <ref name="boolean"/>
|
|---|
| 43 | </element>
|
|---|
| 44 | <element name="uservisible" a:defaultValue="true">
|
|---|
| 45 | <a:documentation>Should the group be visible to users?</a:documentation>
|
|---|
| 46 | <ref name="boolean"/>
|
|---|
| 47 | </element>
|
|---|
| 48 | <optional>
|
|---|
| 49 | <element name="display_order">
|
|---|
| 50 | <ref name="positiveInteger"/>
|
|---|
| 51 | </element>
|
|---|
| 52 | </optional>
|
|---|
| 53 | <optional>
|
|---|
| 54 | <element name="langonly">
|
|---|
| 55 | <ref name="locale"/>
|
|---|
| 56 | </element>
|
|---|
| 57 | </optional>
|
|---|
| 58 | <optional>
|
|---|
| 59 | <ref name="groupreqlist"/>
|
|---|
| 60 | </optional>
|
|---|
| 61 | <ref name="packagelist"/>
|
|---|
| 62 | </interleave>
|
|---|
| 63 | </element>
|
|---|
| 64 | </define>
|
|---|
| 65 | <define name="groupreqlist">
|
|---|
| 66 | <a:documentation>
|
|---|
| 67 | Contains a list of other groups that this group requires.
|
|---|
| 68 | This element has been ignored by yum et. al. since 2005 and should
|
|---|
| 69 | therefore be considered deprecated.
|
|---|
| 70 | </a:documentation>
|
|---|
| 71 | <element name="grouplist">
|
|---|
| 72 | <oneOrMore>
|
|---|
| 73 | <ref name="groupreq"/>
|
|---|
| 74 | </oneOrMore>
|
|---|
| 75 | </element>
|
|---|
| 76 | </define>
|
|---|
| 77 | <define name="groupreq">
|
|---|
| 78 | <element name="groupreq">
|
|---|
| 79 | <ref name="groupname"/>
|
|---|
| 80 | </element>
|
|---|
| 81 | </define>
|
|---|
| 82 | <define name="packagelist">
|
|---|
| 83 | <element name="packagelist">
|
|---|
| 84 | <oneOrMore>
|
|---|
| 85 | <ref name="packagereq"/>
|
|---|
| 86 | </oneOrMore>
|
|---|
| 87 | </element>
|
|---|
| 88 | </define>
|
|---|
| 89 | <define name="packagereq">
|
|---|
| 90 | <element name="packagereq">
|
|---|
| 91 | <choice>
|
|---|
| 92 | <attribute name="type" a:defaultValue="optional">
|
|---|
| 93 | <choice>
|
|---|
| 94 | <value>mandatory</value>
|
|---|
| 95 | <value>default</value>
|
|---|
| 96 | <value>optional</value>
|
|---|
| 97 | </choice>
|
|---|
| 98 | </attribute>
|
|---|
| 99 | <group>
|
|---|
| 100 | <attribute name="type" a:defaultValue="conditional">
|
|---|
| 101 | <choice>
|
|---|
| 102 | <value>conditional</value>
|
|---|
| 103 | </choice>
|
|---|
| 104 | </attribute>
|
|---|
| 105 | <attribute name="requires">
|
|---|
| 106 | <ref name="packagename"/>
|
|---|
| 107 | </attribute>
|
|---|
| 108 | </group>
|
|---|
| 109 | </choice>
|
|---|
| 110 | <optional>
|
|---|
| 111 | <attribute name="basearchonly" a:defaultValue="false">
|
|---|
| 112 | <ref name="boolean"/>
|
|---|
| 113 | </attribute>
|
|---|
| 114 | </optional>
|
|---|
| 115 | <ref name="packagename"/>
|
|---|
| 116 | </element>
|
|---|
| 117 | </define>
|
|---|
| 118 | <define name="category">
|
|---|
| 119 | <element name="category">
|
|---|
| 120 | <interleave>
|
|---|
| 121 | <ref name="id"/>
|
|---|
| 122 | <optional>
|
|---|
| 123 | <element name="display_order">
|
|---|
| 124 | <ref name="positiveInteger"/>
|
|---|
| 125 | </element>
|
|---|
| 126 | </optional>
|
|---|
| 127 | <ref name="grouplist"/>
|
|---|
| 128 | </interleave>
|
|---|
| 129 | </element>
|
|---|
| 130 | </define>
|
|---|
| 131 | <define name="grouplist">
|
|---|
| 132 | <element name="grouplist">
|
|---|
| 133 | <oneOrMore>
|
|---|
| 134 | <ref name="groupid"/>
|
|---|
| 135 | </oneOrMore>
|
|---|
| 136 | </element>
|
|---|
| 137 | </define>
|
|---|
| 138 | <define name="groupid">
|
|---|
| 139 | <element name="groupid">
|
|---|
| 140 | <ref name="string"/>
|
|---|
| 141 | </element>
|
|---|
| 142 | </define>
|
|---|
| 143 | <define name="id">
|
|---|
| 144 | <element name="id">
|
|---|
| 145 | <ref name="ID"/>
|
|---|
| 146 | </element>
|
|---|
| 147 | <choice>
|
|---|
| 148 | <!-- Either we have one _name and one _description (comps.xml.in) -->
|
|---|
| 149 | <group>
|
|---|
| 150 | <element name="_name">
|
|---|
| 151 | <ref name="string"/>
|
|---|
| 152 | </element>
|
|---|
| 153 | <element name="_description">
|
|---|
| 154 | <ref name="string"/>
|
|---|
| 155 | </element>
|
|---|
| 156 | </group>
|
|---|
| 157 | <!-- Or we have one name, one description, and then zero-or-more
|
|---|
| 158 | localized names and descriptions following that. -->
|
|---|
| 159 | <group>
|
|---|
| 160 | <element name="name">
|
|---|
| 161 | <ref name="string"/>
|
|---|
| 162 | </element>
|
|---|
| 163 | <zeroOrMore>
|
|---|
| 164 | <element name="name">
|
|---|
| 165 | <attribute name="xml:lang">
|
|---|
| 166 | <ref name="locale"/>
|
|---|
| 167 | </attribute>
|
|---|
| 168 | <ref name="string"/>
|
|---|
| 169 | </element>
|
|---|
| 170 | </zeroOrMore>
|
|---|
| 171 | <element name="description">
|
|---|
| 172 | <ref name="string"/>
|
|---|
| 173 | </element>
|
|---|
| 174 | <zeroOrMore>
|
|---|
| 175 | <element name="description">
|
|---|
| 176 | <attribute name="xml:lang">
|
|---|
| 177 | <ref name="locale"/>
|
|---|
| 178 | </attribute>
|
|---|
| 179 | <ref name="string"/>
|
|---|
| 180 | </element>
|
|---|
| 181 | </zeroOrMore>
|
|---|
| 182 | </group>
|
|---|
| 183 | </choice>
|
|---|
| 184 | </define>
|
|---|
| 185 | <define name="blacklist">
|
|---|
| 186 | <a:documentation>
|
|---|
| 187 | The "blacklist" is a list of packages that will be *removed* if found
|
|---|
| 188 | during an upgrade. Typically this is used to handle tricky upgrade cases
|
|---|
| 189 | that can't be modeled with existing RPM Obsoletes/Conflicts/etc.
|
|---|
| 190 |
|
|---|
| 191 | Here's an example: In FC6, hal was a multilib package, but in F7 we split
|
|---|
| 192 | it into (non-multilib) hal and (multilib) hal-libs.
|
|---|
| 193 | So the system starts with hal.x86_64 and hal.i386 (for multilib compat).
|
|---|
| 194 | We want to upgrade to hal.x86_64 and hal-libs.x86_64, with hal-libs.i386
|
|---|
| 195 | for multilib. Upgrading hal.x86_64 will bring in hal-libs.x86_64, and
|
|---|
| 196 | upgrading hal.i386 brings in hal-libs.i386. Adding a blacklist item for
|
|---|
| 197 | 'hal.i386' causes anaconda to remove the (now-unneeded) hal.i386,
|
|---|
| 198 | which gives us the desired outcome.
|
|---|
| 199 | </a:documentation>
|
|---|
| 200 | <element name="blacklist">
|
|---|
| 201 | <zeroOrMore>
|
|---|
| 202 | <element name="package">
|
|---|
| 203 | <attribute name="name">
|
|---|
| 204 | <ref name="string"/>
|
|---|
| 205 | </attribute>
|
|---|
| 206 | <optional>
|
|---|
| 207 | <attribute name="arch">
|
|---|
| 208 | <ref name="string"/>
|
|---|
| 209 | <a:documentation>
|
|---|
| 210 | Arch to blacklist this package from. If unspecified, it will be
|
|---|
| 211 | blocked on all arches.
|
|---|
| 212 | <!-- Technically this should be an enum of known arches:
|
|---|
| 213 | i386 x86_64 ppc ppc64 ia64 sparc alpha ... -->
|
|---|
| 214 | </a:documentation>
|
|---|
| 215 | </attribute>
|
|---|
| 216 | </optional>
|
|---|
| 217 | </element>
|
|---|
| 218 | </zeroOrMore>
|
|---|
| 219 | </element>
|
|---|
| 220 | </define>
|
|---|
| 221 | <define name="whiteout">
|
|---|
| 222 | <a:documentation>
|
|---|
| 223 | The RPM "whiteout" list is used to by RPM to break dependency loops.
|
|---|
| 224 | Each "ignoredep" element has two attributes - "package" and "requires" -
|
|---|
| 225 | which are both package names. While calculating dependencies, RPM will
|
|---|
| 226 | ignore any dependency that results in p requiring r.
|
|---|
| 227 |
|
|---|
| 228 | This is used to keep upgrades from getting stuck on known dependency loops,
|
|---|
| 229 | like with mutually dependent packages (e.g. xinitrc and xorg-x11)
|
|---|
| 230 |
|
|---|
| 231 | To feed this info to RPM, each item should be converted to a string of the
|
|---|
| 232 | form 'package>requires', and the RPM macro '_dependency_whiteout' should be
|
|---|
| 233 | filled with a (whitespace-separated) list of these items.
|
|---|
| 234 | </a:documentation>
|
|---|
| 235 | <element name="whiteout">
|
|---|
| 236 | <zeroOrMore>
|
|---|
| 237 | <element name="ignoredep">
|
|---|
| 238 | <attribute name="package">
|
|---|
| 239 | <ref name="string"/>
|
|---|
| 240 | </attribute>
|
|---|
| 241 | <attribute name="requires">
|
|---|
| 242 | <ref name="string"/>
|
|---|
| 243 | </attribute>
|
|---|
| 244 | </element>
|
|---|
| 245 | </zeroOrMore>
|
|---|
| 246 | </element>
|
|---|
| 247 | </define>
|
|---|
| 248 | <define name="boolean">
|
|---|
| 249 | <choice>
|
|---|
| 250 | <value>true</value>
|
|---|
| 251 | <value>True</value>
|
|---|
| 252 | <value>false</value>
|
|---|
| 253 | <value>False</value>
|
|---|
| 254 | </choice>
|
|---|
| 255 | </define>
|
|---|
| 256 | <define name="groupname">
|
|---|
| 257 | <data type="string"/>
|
|---|
| 258 | </define>
|
|---|
| 259 | <define name="ID">
|
|---|
| 260 | <data type="ID"/>
|
|---|
| 261 | </define>
|
|---|
| 262 | <!-- Should be a regexp -->
|
|---|
| 263 | <define name="locale">
|
|---|
| 264 | <data type="string"/>
|
|---|
| 265 | </define>
|
|---|
| 266 | <define name="packagename">
|
|---|
| 267 | <data type="string"/>
|
|---|
| 268 | </define>
|
|---|
| 269 | <define name="positiveInteger">
|
|---|
| 270 | <data type="positiveInteger"/>
|
|---|
| 271 | </define>
|
|---|
| 272 | <define name="string">
|
|---|
| 273 | <data type="string"/>
|
|---|
| 274 | </define>
|
|---|
| 275 | </grammar>
|
|---|