[virt-tools-list] [virt-manager PATCH 1/1] osinfo: deal with rolling distros for EOL status

Pino Toscano ptoscano at redhat.com
Fri Feb 15 12:28:58 UTC 2019


If a distribution has no EOL date set, always consider it supported if
its release status is "rolling".

Signed-off-by: Pino Toscano <ptoscano at redhat.com>
---
 virtinst/osdict.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index 72edc4a6..7e2ca197 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -318,6 +318,13 @@ class _OsVariant(object):
         if eol is not None:
             return now > _glib_to_datetime(eol)
 
+        # TODO: use os.get_release_status() & osinfo.ReleaseStatus.ROLLING
+        # when requiring libosinfo >= 1.4.0.
+        release_status = self._os and self._os.get_param_value(libosinfo.OS_PROP_RELEASE_STATUS) or None
+        # Rolling distributions are never EOL.
+        if release_status and release_status == "rolling":
+            return False
+
         # If no EOL is present, assume EOL if release was > 5 years ago
         if rel is not None:
             rel5 = _glib_to_datetime(rel) + datetime.timedelta(days=365 * 5)
-- 
2.20.1




More information about the virt-tools-list mailing list