[Libosinfo] [osinfo-db] rhel-8: Adjust regex for 8.0 and unknown

Fabiano Fidêncio fidencio at redhat.com
Tue Mar 19 10:10:26 UTC 2019


Let's adjust the 8.0 regex as it may consist in 8.0.x, which should
always be detected as 8.0.

By doing this adjustment, the unknown regex also has to be adjusted
accordingly.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 data/os/redhat.com/rhel-8-unknown.xml.in | 16 ++++++++--------
 data/os/redhat.com/rhel-8.0.xml.in       | 16 ++++++++--------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/data/os/redhat.com/rhel-8-unknown.xml.in b/data/os/redhat.com/rhel-8-unknown.xml.in
index 3bb6f98..23b5bd0 100644
--- a/data/os/redhat.com/rhel-8-unknown.xml.in
+++ b/data/os/redhat.com/rhel-8-unknown.xml.in
@@ -15,7 +15,7 @@
     <media arch="x86_64">
       <iso>
         <system-id>LINUX</system-id>
-        <volume-id>.*RHEL-8-(([1-9]|[1-9][0-9])|(([0-9]|[1-9][0-9])-([0-9]|[1-9][0-9]))).*x86_64.*</volume-id>
+        <volume-id>.*RHEL-8-([1-9]|[1-9][0-9])(-[0-9]|[1-9][0-9])?.*x86_64.*</volume-id>
       </iso>
       <kernel>isolinux/vmlinuz</kernel>
       <initrd>isolinux/initrd.img</initrd>
@@ -24,28 +24,28 @@
     <media arch="aarch64">
        <iso>
          <system-id>LINUX</system-id>
-         <volume-id>RHEL-8-(([1-9]|[1-9][0-9])|(([0-9]|[1-9][0-9])-([0-9]|[1-9][0-9]))).*aarch64$</volume-id>
+         <volume-id>RHEL-8-([1-9]|[1-9][0-9])(-[0-9]|[1-9][0-9])?.*aarch64$</volume-id>
        </iso>
      </media>
 
     <media arch="ppc64le">
        <iso>
          <system-id>PPC</system-id>
-         <volume-id>RHEL[_-]8[_-](([1-9]|[1-9][0-9])|(([0-9]|[1-9][0-9])[_-]([0-9]|[1-9][0-9]))).*ppc64le$</volume-id>
+         <volume-id>RHEL[_-]8[_-]([1-9]|[1-9][0-9])([_-]([0-9]|[1-9][0-9]))?.*ppc64le$</volume-id>
        </iso>
      </media>
 
     <media arch="s390x">
        <iso>
          <system-id>LINUX</system-id>
-         <volume-id>RHEL-8-(([1-9]|[1-9][0-9])|(([0-9]|[1-9][0-9])-([0-9]|[1-9][0-9]))).*s390x$</volume-id>
+         <volume-id>RHEL-8-([1-9]|[1-9][0-9])(-[0-9]|[1-9][0-9])?.*s390x$</volume-id>
        </iso>
      </media>
 
     <tree arch="aarch64">
       <treeinfo>
         <family>Red Hat Enterprise Linux</family>
-        <version>^8.(([1-9]|[1-9][0-9])|(([0-9]|[1-9][0-9]).([0-9]|[1-9][0-9])))$</version>
+        <version>^8.([1-9]|[1-9][0-9])(-[0-9]|[1-9][0-9])?$</version>
         <arch>aarch64</arch>
       </treeinfo>
     </tree>
@@ -53,7 +53,7 @@
     <tree arch="ppc64le">
       <treeinfo>
         <family>Red Hat Enterprise Linux</family>
-        <version>^8.(([1-9]|[1-9][0-9])|(([0-9]|[1-9][0-9]).([0-9]|[1-9][0-9])))$</version>
+        <version>^8.([1-9]|[1-9][0-9])(.([0-9]|[1-9][0-9]))?$</version>
         <arch>ppc64le</arch>
       </treeinfo>
     </tree>
@@ -61,7 +61,7 @@
     <tree arch="s390x">
       <treeinfo>
         <family>Red Hat Enterprise Linux</family>
-        <version>^8.(([1-9]|[1-9][0-9])|(([0-9]|[1-9][0-9]).([0-9]|[1-9][0-9])))$</version>
+        <version>^8.([1-9]|[1-9][0-9])(.([0-9]|[1-9][0-9]))?$</version>
         <arch>s390x</arch>
       </treeinfo>
     </tree>
@@ -69,7 +69,7 @@
     <tree arch="x86_64">
       <treeinfo>
         <family>Red Hat Enterprise Linux</family>
-        <version>^8.(([1-9]|[1-9][0-9])|(([0-9]|[1-9][0-9]).([0-9]|[1-9][0-9])))$</version>
+        <version>^8.([1-9]|[1-9][0-9])(.([0-9]|[1-9][0-9]))?$</version>
         <arch>x86_64</arch>
       </treeinfo>
     </tree>
diff --git a/data/os/redhat.com/rhel-8.0.xml.in b/data/os/redhat.com/rhel-8.0.xml.in
index 7dfef6e..8abb5bc 100644
--- a/data/os/redhat.com/rhel-8.0.xml.in
+++ b/data/os/redhat.com/rhel-8.0.xml.in
@@ -48,7 +48,7 @@
     <media arch="ppc64le">
       <iso>
         <system-id>PPC</system-id>
-        <volume-id>RHEL[_-]8[_-]0[_-]BaseOS[_-]ppc64le</volume-id>
+        <volume-id>RHEL[_-]8[_-]0[_-](([0-9]|[1-9][0-9])[_-])?BaseOS[_-]ppc64le</volume-id>
       </iso>
       <kernel>ppc/ppc64/vmlinuz</kernel>
       <initrd>ppc/ppc64/initrd.img</initrd>
@@ -57,21 +57,21 @@
     <media arch="aarch64">
       <iso>
         <system-id>LINUX</system-id>
-        <volume-id>RHEL-8-0-BaseOS-aarch64</volume-id>
+        <volume-id>RHEL-8-0-(([0-9]|[1-9][0-9])-)?BaseOS-aarch64</volume-id>
       </iso>
     </media>
 
     <media arch="s390x">
       <iso>
         <system-id>LINUX</system-id>
-        <volume-id>RHEL-8-0-BaseOS-s390x</volume-id>
+        <volume-id>RHEL-8-0-(([0-9]|[1-9][0-9])-)?BaseOS-s390x</volume-id>
       </iso>
     </media>
 
     <tree arch="aarch64">
       <treeinfo>
         <family>Red Hat Enterprise Linux</family>
-        <version>8.0$</version>
+        <version>^8.0(.([0-9]|[1-9][0-9]))?$</version>
         <arch>aarch64</arch>
       </treeinfo>
     </tree>
@@ -79,7 +79,7 @@
     <tree arch="ppc64le">
       <treeinfo>
         <family>Red Hat Enterprise Linux</family>
-        <version>^8.0$</version>
+        <version>^8.0(.([0-9]|[1-9][0-9]))?$</version>
         <arch>ppc64le</arch>
       </treeinfo>
     </tree>
@@ -87,7 +87,7 @@
     <tree arch="s390x">
       <treeinfo>
         <family>Red Hat Enterprise Linux</family>
-        <version>^8.0$</version>
+        <version>^8.0(.([0-9]|[1-9][0-9]))?$</version>
         <arch>s390x</arch>
       </treeinfo>
     </tree>
@@ -95,7 +95,7 @@
     <tree arch="x86_64">
       <treeinfo>
         <family>Red Hat Enterprise Linux</family>
-        <version>^8.0$</version>
+        <version>^8.0(.([0-9]|[1-9][0-9]))?$</version>
         <arch>x86_64</arch>
       </treeinfo>
     </tree>
@@ -103,7 +103,7 @@
     <tree arch="aarch64">
       <treeinfo>
         <family>Red Hat Enterprise Linux</family>
-        <version>^8.0$</version>
+        <version>^8.0(.([0-9]|[1-9][0-9]))?$</version>
         <arch>aarch64</arch>
       </treeinfo>
     </tree>
-- 
2.20.1




More information about the Libosinfo mailing list