Re: [Dwai-developers] DF specs again
Status: Beta
Brought to you by:
lucrus
|
From: Lucio C. <lu...@su...> - 2006-04-03 21:42:39
|
We've forget one hopefully last thing: the DF must specify the architecture= of=20 each package. You can find below the new version of the XSD. If there is someone out there who already knows a bit o python (and I know= =20 there is at least one...hello Davide!), could he please point me to a=20 beginners guide to learn the basics and to a reference guide to browse the= =20 library? <?xml version=3D"1.0" encoding=3D"UTF-8" ?> <xs:schema xmlns:xs=3D"http://www.w3.org/2001/XMLSchema"> <!-- the debPackageNameType represents the name of a debian package as=20 understood by apt. I choose "token" as the base type because we don't want= =20 tabs, CRs and the like in a package name. --> <xs:simpleType name=3D"debPackageNameType"> =A0<xs:restriction base=3D"xs:token"/> </xs:simpleType> <!-- The same comment above fits well in debPackageVersionType --> <xs:simpleType name=3D"debPackageVersionType"> =A0<xs:restriction base=3D"xs:token"/> </xs:simpleType> <!-- Same holds true for the architecture --> <xs:simpleType name=3D"debPackageArchitectureType"> <xs:restriction base=3D"xs:token"/> </xs:simpleType> <!-- There isn't much to say here too --> <xs:simpleType name=3D"debRepositoryURIType"> =A0<xs:restriction base=3D"xs:anyURI"/> </xs:simpleType> <!-- A list of repositories assumed to be mirrors --> <xs:complexType name=3D"debRepositoryMirrorsListType"> =A0<xs:sequence> =A0 <xs:element name=3D"mirror" type=3D"debRepositoryURIType"=20 maxOccurs=3D"unbounded" /> =A0</xs:sequence> </xs:complexType> <!-- This type is used to represent any text that should be present=20 in /etc/apt/preferences for the package to be installed correctly. Here we= =20 obviously allow tabs, CRs & Co., hence "string" --> <xs:simpleType name=3D"aptPreferencesTextType"> =A0<xs:restriction base=3D"xs:string"/> </xs:simpleType> <!-- This type will be used to represent any debian flavor the deb package = is=20 designed for, such as Sarge, Etch, Knoppix 4.0.2 or Breezy 5.10. I know we= =20 should bring some sanity in the format of the flavor name, but I don't real= ly=20 know how to. We could require the flavor name to be just the same text a DC= =20 can find in /etc/issue. Any other idea?--> <xs:simpleType name=3D"debianFlavorNameType"> =A0<xs:restriction base=3D"xs:normalizedString"/> </xs:simpleType> <!-- This type is used only in dependencies lists. The deployed deb "packag= e=20 P" may depend on another "package Q *at least* version x.y.z", or on "packa= ge=20 Q *exactly* version x.y.z ", or on "package Q *at most* version x.y.z". Thi= s=20 type carries that kind of information. I'm not sure the syntax below is=20 correct. -->=20 <xs:simpleType name=3D"debPackageVersionRelationshipType"> =A0<xs:restriction base=3D"xs:token"/> =A0 =A0<xs:pattern value=3D"atmost|exactly|atleast"/> </xs:simpleType> <!-- A deb package is the union of a name, a version and an architecture --> <xs:complexType name=3D"debPackageType"> =A0<xs:sequence> =A0 <xs:element name=3D"name" type=3D"debPackageNameType"/> =A0 <xs:element name=3D"version" type=3D"debPackageVersionType"/> <xs:element name=3D"arch" type=3D"debPackageArchitectureType"/> =A0</xs:sequence> </xs:complexType> <!-- A provider type is a package and a version relationship that can satis= fy=20 a particular dependency --> <xs:complexType name=3D"dependencyProviderType"> =A0<xs:sequence> =A0 <xs:element name=3D"package" type=3D"debPackageType"/> =A0 <xs:element name=3D"versionRelationship"=20 type=3D"debPackageVersionRelationshipType"/> =A0</xs:sequence> </xs:complexType> =A0 =A0 <!-- A dependency is a list of providers where each one is an alternative t= hat=20 satisfies said dependency. Obscure? Yes! Let's try with an example: "debcon= f"=20 depends on "debconf-i18n OR debconf-english", so the dependency of debconf = is=20 a list of *two* alternative providers, namely "debconf-i18n" and=20 "debconf-english". -->=20 <xs:complexType name=3D"debPackageDependencyType"> =A0<xs:sequence> =A0 <xs:element name=3D"provider" type=3D"dependencyProviderType"=20 maxOccurs=3D"unbounded" /> =A0</xs:sequence> </xs:complexType> <!-- Finally we have the full dependencies list --> <xs:complexType name=3D"debPackageDependenciesListType"> =A0<xs:sequence> =A0 <xs:element name=3D"dependency" type=3D"debPackageDependencyType" minOc= curs=3D"0"=20 maxOccurs=3D"unbounded"/> =A0</xs:sequence> </xs:complexType> <!-- A sources list is a list of sources. Ahem, obvious, isn't it? --> <xs:complexType name=3D"debSourcesListType"> =A0<xs:sequence> =A0 <xs:element name=3D"source" type=3D"debRepositoryMirrorsListType" minOc= curs=3D"0"=20 maxOccurs=3D"unbounded"/> =A0</xs:sequence> </xs:complexType> <!-- A deployed deb package is a package available for download at the DEW.= It=20 consists of everything defined above --> <xs:complexType name=3D"deployedDebPackageType"> =A0<xs:sequence> =A0 <xs:element name=3D"package" type=3D"debPackageType"/> =A0 <xs:element name=3D"sources" type=3D"debSourcesListType" minOccurs=3D"0= " /> =A0 <xs:element name=3D"preferences" minOccurs=3D"0" maxOccurs=3D"unbounded= "=20 type=3D"aptPreferencesTextType"/> =A0 <xs:element name=3D"debianFlavor" maxOccurs=3D"unbounded"=20 type=3D"debianFlavorNameType"/> =A0 <xs:element name=3D"dependencies" maxOccurs=3D"unbounded"=20 type=3D"debPackageDependenciesListType"/> =A0 =A0</xs:sequence> </xs:complexType> <!-- the DWAI Format can handle multiple packages in a single file, and tha= t's=20 all we say with the dwayType --> <xs:complexType name=3D"dwaiType"> =A0<xs:sequence> =A0 <xs:element name=3D"dwaiEntry" type=3D"deployedDebPackageType"=20 maxOccurs=3D"unbounded"/> =A0</xs:sequence> </xs:complexType> <!-- Each XML file has one and only one root element; in this case the root= =20 element is the dwai tag --> <xs:element name=3D"dwai" type=3D"dwaiType"/> </xs:schema>=20 |