Check whether our mirror packages are up to date.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
929 B

Contains Kernel class
import requests
from distro import Distro
from shared import CSC_MIRROR
class Kernel(Distro):
"""Kernel class"""
def __get_line_count(checksum_file_url):
"""Get Kernel line count of checksum file"""
response_text = requests.get(checksum_file_url).text
return len(response_text.split('\n'))
def name():
"""Get name of Kernel"""
return "Kernel"
def check():
"""Check if Kernel packages are up-to-date"""
official_line_count = Kernel.__get_line_count(
csc_line_count = Kernel.__get_line_count(
# A new update on a certain day adds 2 new lines
return official_line_count <= csc_line_count + 2