Skip to content

Fix arch guessing error when version not fully qualified, fix list-qt android, add --UNSAFE-ignore-hash #909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Kidev
Copy link
Contributor

@Kidev Kidev commented Apr 10, 2025

Fix #908

In run_install_qt, the version in the args is used to determine the architecture. However, if the version is not fully qualified (6.8 in instead of 6.8.3 for example), then the architecture guessing is done with the version not yet resolved. This is because the version guessing also needs the arch. To fix this, I try to guess the arch, then the version, and if the resolved version is different from the argument one, then I run the arch guessing again.

Enable usage when Qt mirrors are down

Added common option --UNSAFE-ignore-hash that have the same effect as setting INSECURE_NOT_FOR_PRODUCTION_ignore_hash: True in the settings.ini file, but from the CLI. It does not edit the config file and affects only the current session. It prints warnings.

kidev:~$ python -m aqt install-qt linux desktop 6.8 --UNSAFE-ignore-hash
WARNING : ************************************************************************************************
WARNING : Hash verification is disabled. This is UNSAFE and may allow malicious files to be downloaded.
WARNING : If your install mirror hosts malicious files, you won't be able to know. Use at your own risk.
WARNING : ************************************************************************************************
INFO    : aqtinstall(aqt) v0.1.dev1903 on Python 3.12.8 [CPython GCC 14.2.1 20240910]
INFO    : Resolved spec '6.8' to 6.8.3
...

Fix #910

(WIP: error fixed, but 6.7.x versions are still missing in list)

The error is in aqt/metadata.py, in fetch_versions / get_versions_extensions. Qt 6.7.X is the only version with the new Qt version folder format that is not yet inside all_os, and the version is not parsed correctly: that's why it flags ValueError: Invalid version string '7': for some reason, 7 is passed to get_semantic_version instead of 6_7_x.

Misc

Added the architectures linux_gcc_64 and win64_msvc2022_64 in the help string.

@Kidev Kidev changed the title Fix architecture guessing error when the version is not fully qualified Fix architecture guessing error when the version is not fully qualified, add --UNSAFE-ignore-hash Apr 17, 2025
@Kidev Kidev changed the title Fix architecture guessing error when the version is not fully qualified, add --UNSAFE-ignore-hash Fix arch guessing error when version not fully qualified, fix list-qt android, add --UNSAFE-ignore-hash Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: cannot get the list of version for linux android [Bug]: Resovling spec to latest fails to install
1 participant