mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-18 05:04:38 +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 semantic_version import Version as SemanticVersion
|
||||||
from texttable import Texttable
|
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
|
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:
|
def is_in_wasm_threaded_range(version: Version) -> bool:
|
||||||
return version in SimpleSpec(">=6.5.0")
|
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:
|
class MetadataFactory:
|
||||||
"""Retrieve metadata of Qt variations, versions, and descriptions from Qt site."""
|
"""Retrieve metadata of Qt variations, versions, and descriptions from Qt site."""
|
||||||
@@ -930,8 +935,8 @@ class MetadataFactory:
|
|||||||
# Examples: extensions.qtwebengine.680.debug_information
|
# Examples: extensions.qtwebengine.680.debug_information
|
||||||
# extensions.qtwebengine.680.win64_msvc2022_64
|
# extensions.qtwebengine.680.win64_msvc2022_64
|
||||||
ext_pattern = re.compile(r"^extensions\." + r"(?P<module>[^.]+)\." + qt_ver_str + r"\." + arch + r"$")
|
ext_pattern = re.compile(r"^extensions\." + r"(?P<module>[^.]+)\." + qt_ver_str + r"\." + arch + r"$")
|
||||||
if version >= Version("6.8.0"):
|
for ext in QtRepoProperty.known_extensions(version):
|
||||||
for ext in self.fetch_extensions():
|
try:
|
||||||
ext_meta = self._fetch_extension_metadata(self.archive_id.to_extension_folder(ext, qt_ver_str, arch))
|
ext_meta = self._fetch_extension_metadata(self.archive_id.to_extension_folder(ext, qt_ver_str, arch))
|
||||||
for key, value in ext_meta.items():
|
for key, value in ext_meta.items():
|
||||||
ext_match = ext_pattern.match(key)
|
ext_match = ext_pattern.match(key)
|
||||||
@@ -939,6 +944,8 @@ class MetadataFactory:
|
|||||||
module = ext_match.group("module")
|
module = ext_match.group("module")
|
||||||
if module is not None:
|
if module is not None:
|
||||||
m[module] = value
|
m[module] = value
|
||||||
|
except (ChecksumDownloadFailure, ArchiveDownloadError):
|
||||||
|
pass
|
||||||
return ModuleData(m)
|
return ModuleData(m)
|
||||||
|
|
||||||
def fetch_modules_sde(self, cmd_type: str, version: Version) -> List[str]:
|
def fetch_modules_sde(self, cmd_type: str, version: Version) -> List[str]:
|
||||||
|
|||||||
Reference in New Issue
Block a user