diff --git a/config/config.toml.default b/config/config.toml.default index 98f5199..762006b 100644 --- a/config/config.toml.default +++ b/config/config.toml.default @@ -19,7 +19,7 @@ enabled = true [DiagnosticTools.Rescuezilla] enabled = true # Available editions: -# "focal", "jammy", "kinetic" +# "focal", "jammy", "lunar", "mantic", "noble" editions = ["jammy"] # Boot Repair diff --git a/modules/updaters/Rescuezilla.py b/modules/updaters/Rescuezilla.py index cd938a9..1fb8183 100644 --- a/modules/updaters/Rescuezilla.py +++ b/modules/updaters/Rescuezilla.py @@ -27,7 +27,7 @@ class Rescuezilla(GenericUpdater): """ def __init__(self, folder_path: Path, edition: str) -> None: - self.valid_editions = ["focal", "jammy", "kinetic"] + self.valid_editions = ["focal", "jammy", "lunar", "mantic", "noble"] self.edition = edition.lower() file_path = folder_path / FILE_NAME diff --git a/modules/updaters/SuperGrub2.py b/modules/updaters/SuperGrub2.py index 0f53662..09f39b8 100644 --- a/modules/updaters/SuperGrub2.py +++ b/modules/updaters/SuperGrub2.py @@ -21,7 +21,7 @@ class SuperGrub2(GenericUpdater): """ - A class representing an updater for Hiren's Boot CD PE. + A class representing an updater for SuperGrub2. Attributes: download_page (requests.Response): The HTTP response containing the download page HTML. @@ -76,7 +76,12 @@ def check_integrity(self, archive_to_check: Path) -> bool: sha256_sums_tag = sha256_sums_tag[-1] sha256_checksums_str = sha256_sums_tag.getText() sha_256_checksum: str = parse_hash( - sha256_checksums_str, ["supergrub2", ".img.zip"], 0 + sha256_checksums_str, + [ + f"supergrub2-{self._get_latest_version()[0]}", + ".img.zip", + ], + 0, ) return sha256_hash_check(archive_to_check, sha_256_checksum) diff --git a/modules/utils.py b/modules/utils.py index f6fdb15..f3718ee 100644 --- a/modules/utils.py +++ b/modules/utils.py @@ -197,7 +197,7 @@ def pgp_check(file_path: Path, signature: str | bytes, public_key: str | bytes) result = bool(pub_key.verify(file_content, sig)) - print( + logging.debug( f"[pgp_check] {file_path.resolve()}: Signature is {'' if result else 'not'} valid" ) @@ -220,11 +220,13 @@ def parse_hash( logging.debug( f"[parse_hash] Parsing hashes with match strings `{match_strings_in_line}` and hash position {hash_position_in_line} in those hashes:\n{hashes}" ) - return next( + hash = next( line.split()[hash_position_in_line] for line in hashes.strip().splitlines() if all(match in line for match in match_strings_in_line) ) + logging.debug(f"[parse_hash] Extracted hash: `{hash}`") + return hash def download_file(url: str, local_file: Path, progress_bar: bool = True) -> None: diff --git a/setup.py b/setup.py index c4a1f75..88021a4 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ setup( name="sisou", # Required - version="1.1.5", # Required + version="1.1.6", # Required description="A powerful tool to conveniently update all of your ISO files!", # Optional long_description=long_description, # Optional long_description_content_type="text/markdown", # Optional