[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [v2v PATCH] v2v: -o libvirt: write CentOS 8 osinfo ID



CentOS 8 is represented with a simpler osinfo ID without a minor
version.
---
 v2v/create_libvirt_xml.ml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/v2v/create_libvirt_xml.ml b/v2v/create_libvirt_xml.ml
index dbc24315..002ce2b8 100644
--- a/v2v/create_libvirt_xml.ml
+++ b/v2v/create_libvirt_xml.ml
@@ -43,9 +43,14 @@ let get_osinfo_id = function
       i_major_version = major; i_minor_version = minor } when major < 7 ->
     Some (sprintf "http://centos.org/centos/%d.%d"; major minor)
 
-  | { i_type = "linux"; i_distro = "centos"; i_major_version = major } ->
+  | { i_type = "linux"; i_distro = "centos"; i_major_version = major }
+    when major = 7 ->
     Some (sprintf "http://centos.org/centos/%d.0"; major)
 
+  | { i_type = "linux"; i_distro = "centos"; i_major_version = major }
+    when major >= 8 ->
+    Some (sprintf "http://centos.org/centos/%d"; major)
+
   | { i_type = "linux"; i_distro = "sles";
       i_major_version = major; i_minor_version = 0;
       i_product_name = product } when String.find product "Desktop" >= 0 ->
-- 
2.23.0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]