[Libosinfo] [osinfo-db PATCH] RFC: schema: Add "purpose" attribute to medias

Fabiano Fidêncio fidencio at redhat.com
Thu Nov 15 12:36:16 UTC 2018


Several distros follow the approach of realeasing ISOs that would be
focused on Desktop or Server usage. In order to allow Apps to sort the
ISOs they have according to its "purpose" let's add an additional
argument to the media element in order to make this distinction.

An example of the XML would be:
<media arch="i686" purpose="server">
  <url>http://old-releases.ubuntu.com/releases/zesty/ubuntu-17.04-server-i386.iso</url>
  <iso>
    <volume-id>Ubuntu-Server 17.04(.\d)? i386</volume-id>
  </iso>
  <kernel>install/vmlinuz</kernel>
  <initrd>install/initrd.gz</initrd>
</media>

Again, the "purpose" attribute is optional and may have the following
values: server, desktop, or generic.

"generic" is the value chosen in case it's not defined.

https://gitlab.com/libosinfo/libosinfo/issues/7

Is this approach reasonable? I'd like to get some feedback here before
implenting the libosinfo side of this. :-)

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 data/schema/osinfo.rng.in | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/data/schema/osinfo.rng.in b/data/schema/osinfo.rng.in
index 6693391..e09d43b 100644
--- a/data/schema/osinfo.rng.in
+++ b/data/schema/osinfo.rng.in
@@ -337,6 +337,14 @@
     </element>
   </define>
 
+  <define name='purposenames'>
+    <choice>
+      <value>generic</value>
+      <value>desktop</value>
+      <value>server</value>
+    </choice>
+  </define>
+
   <define name='media'>
     <element name='media'>
       <attribute name='arch'>
@@ -362,6 +370,11 @@
           <ref name='bool'/>
         </attribute>
       </optional>
+      <optional>
+        <attribute name='purpose'>
+          <ref name='purposenames'/>
+        </attribute>
+      </optional>
       <interleave>
         <optional>
           <element name='variant'>
-- 
2.19.1




More information about the Libosinfo mailing list