[elbe-devel] [PATCH 1/1] Add schema restriction for set_packer XML node
dion at linutronix.de
dion at linutronix.de
Wed Jul 24 11:05:09 CEST 2019
From: Olivier Dion <dion at linutronix.de>
See <https://github.com/Linutronix/elbe/issues/207>.
Packer's type are checked during schema validation instead of throwing
a KeyError exception in the project finetuning phase.
Signed-off-by: Olivier Dion <dion at linutronix.de>
---
schema/dbsfed.xsd | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/schema/dbsfed.xsd b/schema/dbsfed.xsd
index fbed8e98..7c1ea72a 100644
--- a/schema/dbsfed.xsd
+++ b/schema/dbsfed.xsd
@@ -2087,11 +2087,21 @@
</annotation>
<simpleContent>
<extension base="rfs:string">
- <attribute name="packer" type="string" use="required" />
+ <attribute name="packer" type="rfs:packer-type" use="required" />
</extension>
</simpleContent>
</complexType>
+ <simpleType name="packer-type">
+ <restriction base="string">
+ <enumeration value="none" />
+ <enumeration value="gzip" />
+ <enumeration value="tar" />
+ <enumeration value="tarxz" />
+ <enumeration value="targz" />
+ </restriction>
+ </simpleType>
+
<complexType name="file">
<annotation>
<documentation>
--
2.11.0
More information about the elbe-devel
mailing list