package-helpers-cmxsl/helpers/DATA/distro-info/distro_info_py.patch

75 lines
2.9 KiB
Diff

diff --git a/python/distro_info.py b/python/distro_info.py
index c87fbff6..0a624745 100644
--- a/python/distro_info.py
+++ b/python/distro_info.py
@@ -1,3 +1,4 @@
+# Copyright (C) 2021, Trisquel GNU/Linux developers <trisquel-devel@listas.trisquel.info>
# Copyright (C) 2009-2012, Benjamin Drung <bdrung@debian.org>
#
# Permission to use, copy, modify, and/or distribute this software for any
@@ -12,7 +13,7 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-"""provides information about Ubuntu's and Debian's distributions"""
+"""provides information about Trisquel's and Debian's distributions"""
import csv
import datetime
@@ -100,7 +101,7 @@
class DistroInfo:
"""Base class for distribution information.
- Use DebianDistroInfo or UbuntuDistroInfo instead of using this directly.
+ Use DebianDistroInfo or TrisquelDistroInfo instead of using this directly.
"""
def __init__(self, distro):
@@ -340,16 +340,16 @@ class DebianDistroInfo(DistroInfo):
]
-class UbuntuDistroInfo(DistroInfo):
- """provides information about Ubuntu's distributions"""
+class TrisquelDistroInfo(DistroInfo):
+ """provides information about Trisquel's distributions"""
def __init__(self) -> None:
- super().__init__("Ubuntu")
+ super().__init__("Trisquel")
def lts(
self, date: typing.Optional[datetime.date] = None, result: str = "codename"
) -> typing.Union[DistroRelease, str]:
- """Get latest long term support (LTS) Ubuntu distribution based on the
+ """Get latest long term support (LTS) Trisquel distribution based on the
given date."""
if date is None:
date = self._date
@@ -372,7 +372,7 @@ class UbuntuDistroInfo(DistroInfo):
def supported(
self, date: typing.Optional[datetime.date] = None, result: str = "codename"
) -> list[typing.Union[DistroRelease, str]]:
- """Get list of all supported Ubuntu distributions based on the given
+ """Get list of all supported Trisquel distributions based on the given
date."""
if date is None:
date = self._date
@@ -382,17 +382,3 @@ class UbuntuDistroInfo(DistroInfo):
if (x.eol and date <= x.eol) or (x.eol_server is not None and date <= x.eol_server)
]
return distros
-
- def supported_esm(
- self, date: typing.Optional[datetime.date] = None, result: str = "codename"
- ) -> list[typing.Union[DistroRelease, str]]:
- """Get list of all ESM supported Ubuntu distributions based on the
- given date."""
- if date is None:
- date = self._date
- distros = [
- self._format(result, x)
- for x in self._avail(date)
- if x.eol_esm is not None and date <= x.eol_esm
- ]
- return distros