When the destination drive is not writable or has insufficient space,
these exceptions are raised during `run_installer`. Unless they are
caught and dealt with, `aqtinstall` requests that the user file a bug
report. This change catches these errors and prints a nice error message
instead of requesting a bug report.
This will reduce code duplication and make the warning messages easier
to improve in the future, since they will only need to be changed in one
location.
This improves the warnings about unknown versions, modules, and
architectures of Qt, so that it is more explicit what the message
actually means.
This changes the purpose of `Cli._check_modules_arg` from checking if
modules exist in combinations.json, to returning a list of modules
that do not exist in that file. The function has been renamed as well.
This change was necessary to make the warning message more informative.
The `--autodesktop` flag is only useful when installing Qt6 for mobile
or wasm. The previous implementation would unnecessarily cause it to
install a desktop Qt for Qt5 mobile installations. This change ensures
that `--autodesktop` will not install an extra desktop Qt for any Qt5
installation.
The `--autodesktop` flag is only useful when installing Qt6 for mobile
or wasm. There is no need to have an additional desktop Qt installation
for any Qt5 mobile or wasm installs. This updates the docs to reflect
that.
- Introduce classes inherit argparse.ArgumentParser to suppress mypy
errors in Cli class.
- `requests.session.Session.get()` expects that `timeout` is `float | tuple[float, float] | tuple[float, None] | None`
so use `Tuple[float, float]` for timeout
- Use named tuple for modules_query
- Update test_list.py
When we print the link with trailing dot, some automatic log-formaters will add that dot to the link itself.
E.g. when you use Github Actions this link will show up with extra dot and therefore does not work.
By removing the dot, the link is functional also in these cases.
Causes `get_hash` to verify the hash length, and check that the hash can
be unhexlified properly.
Fixes the interface for `get_hash` so that the caller does not have to
run `binascii.unhexlify` or verify its output.
To keep this commit small, `hashurl` was removed from QtPackage, and
`get_hash` constructs the hash url based on the url of the 7z archive
to download. I think that in the future, QtArchive and QtPackage could
be refactored to construct this url more appropriately. However, this
would be a complicated change that doesn't belong in this commit.
This allows a user to turn on `--keep` every time they run the program,
and to set the default archive destination when `--keep` is turned on.
Using `--archive-dest` overrides the archive destination in setting.ini.
This adds the parameter `archive_dest` to `run_installer`, which will
control where `helper.downloadBinaryFile` will download files, and sets
it to "." by default.
For convenience/readability, this will also turn any reference to the
downloaded file into a `pathlib.Path` object. This makes it easier to
ensure that the file ends up in the right location.
This changes the CLI so that the `target` parameter for `install-src`,
`install-doc`, and `install-example` is now ignored, and "desktop" is
substituted for anything the user inputs. The only valid option here
is "desktop" anyway, so the user should be forgiven for trying to input
anything else.
It may be better to remove `target` from the parameter list, but that's
a big change to the interface that could break a lot of dependent code.
This modifies `aqt tool` to allow `-` characters in tool versions, so
that `aqt tool` can pass the same unit tests that `install-tool` can.
This makes it less like the `aqt tool` from v1.2.5, but it should work
better with more tools with different version formats.