Commit Graph

164 Commits

Author SHA1 Message Date
tsteven4
a1ffb938a8 fix regression "check packaging" 2024-11-28 11:43:16 -07:00
tsteven4
ee40b25e84 fix regression failures. 2024-11-28 11:28:56 -07:00
tsteven4
5a13230a3b fix pre 6.8.0 installs 2024-11-28 10:17:27 -07:00
tsteven4
aa222a59db search a list of possible extensions.
currently qtwebengine, qtpdf.
2024-11-27 15:12:29 -07:00
tsteven4
1d528c205f look for modules in extensions directory. 2024-11-27 12:00:03 -07:00
Hiroshi Miura
65e760383f fix: remove logic to check combination
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2024-08-05 08:00:32 +09:00
Hiroshi Miura
56c2a38756 fix: doc/src/example URL in Qt 6.8.0
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2024-07-30 12:58:08 +09:00
Hiroshi Miura
649c55ed46 fix: installation of android for Qt 6.8.0 (#801)
* fix: installation of android for Qt 6.8.0

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* style: wrap a long line

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* style: apply black

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

---------

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2024-07-02 12:20:58 +09:00
Hiroshi Miura
b8f7ed69c1 feat: support list Qt 6.8.0 windows_arm64
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2024-06-20 21:15:13 +09:00
Hiroshi Miura
196cf2b495 feat: support windows/6.8.0 install
test command line
aqt install-qt windows desktop 6.8.0 win64_msvc2022_64
and
aqt install-qt windows desktop 6.8.0 win64_mingw

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2024-06-20 19:42:50 +09:00
AdrianEddy
47cd6d35ab Fix installing Qt for Android 6.7.0 2024-05-23 01:55:23 +02:00
Andrew Wason
f049a82d9d Override host/target for src/docs if Qt >= 6.7.0 (#776)
* Override host/target for src/docs if Qt >= 6.7.0

Fixes https://github.com/miurahr/aqtinstall/issues/775
2024-05-05 09:28:02 +09:00
Andrew Wason
d0603a2555 Handle linux desktop arm64 arch with Qt 6.7.0 via new linux_arm64 host.
Top level directories are `qtsdkrepository/linux_x64` or `qtsdkrepository/linux_arm64`
qtsdkrepository files are suffixed with `.linux_gcc_64` or `.linux_gcc_arm64`
Installation directory is `gcc_64` or `gcc_arm64`
2024-03-05 09:55:10 -05:00
lebarsfa
612dc7ba91 Add ignore_hash option in settings.ini (#684)
* Settings: add an option to skip checksum verification on Updates.xml

This allows aqt to work even when the server download.qt.io is
unreachable.

Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>

* Update settings.ini

* Correct option to skip checksum verification

* Rename ignore_hash option to INSECURE_NOT_FOR_PRODUCTION_ignore_hash

* Update doc about INSECURE_NOT_FOR_PRODUCTION_ignore_hash

* Add hash_algorithm option

* Unofficial mirrors might not provide any hash for Updates.xml

* docs: update configuration.rst

express default value of hash_algorithm

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* fix: hashlib constructor with usedforsecurity=False

- Python 3.9 and later introduce a keyword argument ``usedforsecurity``
- Set to False because we use hash to check file integrity not for password hash.

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Attempt to fix parameter type inconsistency in downloadBinaryFile

---------

Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Co-authored-by: Alberto Mardegan <mardy@users.sourceforge.net>
Co-authored-by: Hiroshi Miura <miurahr@linux.com>
2023-11-06 07:29:03 +09:00
Dave Dalcino
e30d3198a4 Fix errors in install-* caused by duplicate 'modules'
Fixes #632
2023-01-07 06:57:28 -08:00
Hiroshi Miura
1dbd73450a Adjust code scanner warnings
- Replace map+filter and list+filter with list comprehension expression
- Use try/except for next(Iterator)
- Add test case for altlink that cause exception on next() in get_altlink
- Avoid exit but use sys.exit

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2022-11-21 07:34:45 +09:00
Dave Dalcino
452f8d74b2 Fix mypy type errors
- 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
2022-11-21 07:34:45 +09:00
David Dalcino
acc0f53eb1 improve check for empty subarchives
Co-authored-by: Hiroshi Miura <miurahr@linux.com>
2022-11-20 15:20:27 +09:00
Dave Dalcino
81eebde168 Adjust against mypy type errors 2022-11-20 15:20:27 +09:00
Dave Dalcino
8faa44c9ba Fix downstream type errors 2022-09-21 16:26:26 -07:00
Dave Dalcino
2d1d71df8d Allow for empty DownloadArchive tags
This also updates the type hints for the PackageUpdate class, to make
it easier to understand the datatypes. It also adds some assertions
to prove what types they are.
2022-09-21 16:25:09 -07:00
Hiroshi Miura
2a89308818 Add Updates, PackageUpdate data class
- Drop update_xml and its content from field of QtArchives class
- Add test for Updates class

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2022-06-12 00:13:00 +09:00
Hiroshi Miura
638f94a690 archives: do not keep update.xml text in field
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2022-06-11 12:19:42 +09:00
David Dalcino
dc45839df4 Fix implementation of helper.get_hash
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.
2022-03-20 14:16:24 -07:00
David Dalcino
5ad7c1a058 Use defusedxml to parse Updates.xml files
I don't think we can really call the `Updates.xml` files that we are
parsing 'untrusted xml', because we are checking that they match the
sha256 checksum. However, I don't think there's any good reason not to
use a more secure parsing algorithm.
2022-03-10 17:23:58 -08:00
David Dalcino
f979d80899 WIP use checksums for updates.xml files 2022-03-06 17:56:25 -08:00
David Dalcino
96af3eb393 Refactor: split QtArchive.archive_url into parts
This splits QtArchive.archive_url into two new datamembers: archive_path
and base_url. Ultimately, base_url should be removed from QtPackage
entirely.
2022-03-06 17:36:32 -08:00
David Dalcino
7ebd6aa34e Use sha256 hashes only from trusted mirrors
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.
2022-03-06 17:36:32 -08:00
Hiroshi Miura
eaf5a46e48 Merge pull request #459 from ddalcino/fix-archives-flag
Restrict effect of `--archives` flag to base and debug_info modules
2022-01-26 14:21:47 +09:00
Hiroshi Miura
9b66f03718 Accept Update.xml that use comma without space as delimiter
resolve #475

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2022-01-12 22:24:16 +09:00
David Dalcino
9c706a270c Fix implementation of --archives flag 2021-12-05 11:53:38 -08:00
David Dalcino
078154c0db refactor QtArchives base pkg name accessors
This adds an accessor function, `QtArchives._base_package_names`,
that returns a list of all possible PackageUpdate.Name properties
for the base package

This also renames `QtArchives._base_target_package_name` to
`_base_module_name`, so that its meaning is more clear in context
and not so easy to confuse with the new function.
2021-12-05 11:53:35 -08:00
David Dalcino
022373683b Allow SrcDocExamplesArchives to omit base
This change allows for the future implementation of a `--noarchives`
flag for the `install-src/doc/example` commands.
I don't know if end users will need this or not, but I need this to
determine whether or not archive filtration works properly.
This property is tested in `tests/test_archive.py` at
`test_archives_weird_module_7z_name()`.
2021-12-05 11:53:31 -08:00
David Dalcino
cfc241002d Fix suggestions for src/doc/ex missing modules 2021-11-23 12:17:03 -08:00
David Dalcino
621cd7a6c0 Fix implementation of aqt tool
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.
2021-10-30 19:23:35 -07:00
David Dalcino
38a125ee6b Clarify meaning and scope of all_archives
This is a code-readability improvement. Every time I read this code,
I get tripped up by the `if not all_archives:` line, and I have to hunt
for all uses of `all_archives` to see what it means and what it does.

This change moves the assignment next to its usage, so its meaning and
scope are immediately clear, and no hunting is necessary. This also
gives it a less ambiguous name.

This change will likely make the reader wonder if this variable is
needed at all; the conditional `if subarchives is not None:` would
probably work just as well. I would tend to agree.
However, I am leaving this variable in because the variable name
documents what the code is doing and why.

I recognize that the value of this change is very subjective, and I am
happy to revert this if necessary.
2021-10-20 19:53:09 -07:00
David Dalcino
46fc2aaf9f Cause --noarchives to omit the base Qt module 2021-10-20 19:32:36 -07:00
David Dalcino
c5b89f6170 fail on mismatched tool versions
This recreates the legacy behavior, where `aqt tool` would fail to
install a tool variant when the version in the xml file does not match
the version requested in cli arguments.

This also recreates a bug where `aqt tool` cannot install tools that
do not have a valid semantic version.
2021-09-30 19:15:32 -07:00
David Dalcino
8c7d50d9f0 Simplify help message 2021-09-20 13:01:50 -07:00
David Dalcino
a5bb2553ce Add improved error messages for missing archives 2021-09-20 12:46:47 -07:00
David Dalcino
1a918c35c5 Merge remote-tracking branch 'upstream/master' into specify-version-by-simplespec 2021-09-09 08:26:10 -07:00
David Dalcino
5a1aedb480 Add functions to determine extensions
This moves the logic for determining extensions out of the QtArchive
class so that it is available elsewhere and does not need to be
duplicated.
2021-09-07 14:27:51 -07:00
David Dalcino
88c30d90d0 Raise exceptions from existing exceptions 2021-09-02 09:57:34 -07:00
David Dalcino
7fa9dff9ea Don't duplicate error messages in QtArchives 2021-09-01 12:37:54 -07:00
David Dalcino
c9c1388027 Merge remote-tracking branch 'upstream/master' into fail-on-missing-modules
# Conflicts:
#	aqt/archives.py
#	tests/test_archives.py
2021-08-25 09:49:59 -07:00
David Dalcino
e1c7bd0c1b Cause ToolArchive failure when variant is missing
This allows test_tools_variants to pass.
2021-08-24 10:10:31 -07:00
David Dalcino
ba86bbbb48 Allow empty version string
The interface for ToolArchives says that `version_str` is optional,
but when you try to use it with the default value, the QtArchives
constructor raises a ValueError exception. This change substitutes
the dummy value used by the Cli.run_install_tool for version_str, when
version_str is empty.
2021-08-24 10:06:07 -07:00
David Dalcino
9b29055797 Implement check for missing modules 2021-08-23 10:57:27 -07:00
David Dalcino
499fdb020f Use posixpath.join to compose urls
This makes sure that all urls composed in QtArchive are put together
properly, using posixpath.join. #287 did this in a few places, but not
all.
2021-08-23 10:57:25 -07:00
David Dalcino
847bd420a3 Add type hints to QtArchives
This is meant to make the QtArchives class more readable, so the types
of each data member are absolutely clear.
2021-08-23 10:57:24 -07:00