[virt-manager PATCH] osdict: extend non-EOL distros range to 10 years
Cole Robinson
crobinso at redhat.com
Tue Aug 18 17:52:18 UTC 2020
On 8/18/20 12:47 PM, Pino Toscano wrote:
> Commit d52d9885c85623b8d924dbf0aceecb08b33e9122 added a logic to
> consider as EOL a distribution with no EOL date set and release date
> earlier than 5 years from the current day. This was done because there
> were (and still are, even if fewer now) many old OSes in osinfo-db with
> no EOL date set, which were thus considered "supported". Sadly, OSes
> that are still supported, like Windows 10, Windows Server 2012, or
> earlier versions of RHEL/CentOS/OL 6/7, are now considered "EOL".
>
> As a hack on top of the initial hack, extend the range from 5 years to
> 10 years: this will consider some of the aforementioned OSes as
> supported, without adding too many other OSes.
>
> Of course the long term solution is to make sure all the OSes in
> osinfo-db that are EOL upstream have a EOL date set, so there is no more
> need to arbitrary exclusion logic.
>
> Signed-off-by: Pino Toscano <ptoscano at redhat.com>
> ---
> virtinst/osdict.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/virtinst/osdict.py b/virtinst/osdict.py
> index 93d457e1..3be1d102 100644
> --- a/virtinst/osdict.py
> +++ b/virtinst/osdict.py
> @@ -474,9 +474,9 @@ class _OsVariant(object):
> if release_status == "rolling":
> return False
>
> - # If no EOL is present, assume EOL if release was > 5 years ago
> + # If no EOL is present, assume EOL if release was > 10 years ago
> if rel is not None:
> - rel5 = _glib_to_datetime(rel) + datetime.timedelta(days=365 * 5)
> + rel5 = _glib_to_datetime(rel) + datetime.timedelta(days=365 * 10)
> return now > rel5
> return False
>
>
Thanks, pushed now
- Cole
More information about the virt-tools-list
mailing list