mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-17 04:34:37 +03:00
for --long-modules assume extension doesn't exist on download error.
This commit is contained in:
@@ -37,7 +37,7 @@ from semantic_version import SimpleSpec as SemanticSimpleSpec
|
||||
from semantic_version import Version as SemanticVersion
|
||||
from texttable import Texttable
|
||||
|
||||
from aqt.exceptions import ArchiveConnectionError, ArchiveDownloadError, ArchiveListError, CliInputError, EmptyMetadata
|
||||
from aqt.exceptions import ArchiveConnectionError, ArchiveDownloadError, ArchiveListError, CliInputError, EmptyMetadata, ChecksumDownloadFailure
|
||||
from aqt.helper import Settings, get_hash, getUrl, xml_to_modules
|
||||
|
||||
|
||||
@@ -556,6 +556,11 @@ class QtRepoProperty:
|
||||
def is_in_wasm_threaded_range(version: Version) -> bool:
|
||||
return version in SimpleSpec(">=6.5.0")
|
||||
|
||||
@staticmethod
|
||||
def known_extensions(version: Version) -> List[str]:
|
||||
if version >= Version("6.8.0"):
|
||||
return ["qtpdf", "qtwebengine"]
|
||||
return []
|
||||
|
||||
class MetadataFactory:
|
||||
"""Retrieve metadata of Qt variations, versions, and descriptions from Qt site."""
|
||||
@@ -930,8 +935,8 @@ class MetadataFactory:
|
||||
# Examples: extensions.qtwebengine.680.debug_information
|
||||
# extensions.qtwebengine.680.win64_msvc2022_64
|
||||
ext_pattern = re.compile(r"^extensions\." + r"(?P<module>[^.]+)\." + qt_ver_str + r"\." + arch + r"$")
|
||||
if version >= Version("6.8.0"):
|
||||
for ext in self.fetch_extensions():
|
||||
for ext in QtRepoProperty.known_extensions(version):
|
||||
try:
|
||||
ext_meta = self._fetch_extension_metadata(self.archive_id.to_extension_folder(ext, qt_ver_str, arch))
|
||||
for key, value in ext_meta.items():
|
||||
ext_match = ext_pattern.match(key)
|
||||
@@ -939,6 +944,8 @@ class MetadataFactory:
|
||||
module = ext_match.group("module")
|
||||
if module is not None:
|
||||
m[module] = value
|
||||
except (ChecksumDownloadFailure, ArchiveDownloadError):
|
||||
pass
|
||||
return ModuleData(m)
|
||||
|
||||
def fetch_modules_sde(self, cmd_type: str, version: Version) -> List[str]:
|
||||
|
||||
Reference in New Issue
Block a user