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

Cole Robinson crobinso at redhat.com
Tue Feb 19 21:12:13 UTC 2019


On 2/15/19 7:28 AM, Pino Toscano wrote:
> 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)
> 

Tweaked the formatting a bit and pushed, thanks

- Cole




More information about the virt-tools-list mailing list