miurahr / aqtinstall

aqt: Another (unofficial) Qt CLI Installer on multi-platforms
https://aqtinstall.readthedocs.io/en/latest/
MIT License
913 stars 84 forks source link

install-src and install-doc fail for 6.7.0 #775

Closed rectalogic closed 5 months ago

rectalogic commented 6 months ago

Describe the bug install-src and install-doc both fail for macos

To Reproduce

> aqt install-src mac 6.7.0 -O /tmp/qt
INFO    : aqtinstall(aqt) v3.1.12 on Python 3.11.8 [CPython Clang 15.0.0 (clang-1500.1.0.2.5)]
WARNING : Failed to download checksum for the file 'Updates.xml'. This may happen on unofficial mirrors.
ERROR   : Failed to locate XML data for Qt version '6.7.0'.
==============================Suggested follow-up:==============================
* Please use 'aqt list-qt mac desktop' to show versions available.
> aqt install-doc mac 6.7.0 -O /tmp/qt
INFO    : aqtinstall(aqt) v3.1.12 on Python 3.11.8 [CPython Clang 15.0.0 (clang-1500.1.0.2.5)]
WARNING : Failed to download checksum for the file 'Updates.xml'. This may happen on unofficial mirrors.
ERROR   : Failed to locate XML data for Qt version '6.7.0'.
==============================Suggested follow-up:==============================
* Please use 'aqt list-qt mac desktop' to show versions available.

Expected behavior Should install

aqt output See attached aqtinstall.log

Desktop (please complete the following information):

Additional context aqt is attempting to download https://download.qt.io/online/qtsdkrepository/mac_x64/desktop/qt6_670_src_doc_examples/Updates.xml.sha256 but it appears 6.7.0 has moved this to https://download.qt.io/online/qtsdkrepository/all_os/qt/qt6_670_src_doc_examples/Updates.xml

pcolby commented 5 months ago

The same issue applies to Linux too (but not Windows).

2024-04-29 00:04:10,247 - aqt.main - INFO - installer 139878233721728 aqtinstall(aqt) v3.1.13 on Python 3.12.3 [CPython GCC 11.4.0]
2024-04-29 00:04:10,248 - aqt.helper - DEBUG - helper 139878233721728 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_670_src_doc_examples/Updates.xml.sha256
2024-04-29 00:04:11,019 - aqt.helper - DEBUG - helper 139878233721728 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_670_src_doc_examples/Updates.xml.sha256
2024-04-29 00:04:11,624 - aqt.helper - DEBUG - helper 139878233721728 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_670_src_doc_examples/Updates.xml.sha256
2024-04-29 00:04:12,291 - aqt.helper - DEBUG - helper 139878233721728 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_670_src_doc_examples/Updates.xml.sha256
2024-04-29 00:04:12,895 - aqt.helper - DEBUG - helper 139878233721728 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_670_src_doc_examples/Updates.xml.sha256
2024-04-29 00:04:13,499 - aqt.archives - WARNING - archives 139878233721728 Failed to download checksum for the file 'Updates.xml'. This may happen on unofficial mirrors.
2024-04-29 00:04:14,105 - aqt.main - ERROR - installer 139878233721728 Failed to locate XML data for Qt version '6.7.0'.

Seems to be that Qt has adjusted the online installer's archive paths.

miurahr commented 5 months ago

I confirmed there is https://download.qt.io/online/qtsdkrepository/all_os/qt/ image

miurahr commented 5 months ago

Does #785 works for you? @pcolby

miurahr commented 5 months ago

776 also target to fix here. I'd like to take #776.

pcolby commented 5 months ago

Thanks @miurahr,

Does #785 works for you? @pcolby

The short version: Yes!! πŸ˜„ Thanks.

The longer version: My specific use case (installing via install-qt-action) runs:

python -m aqt install-doc linux 6.7.0 --outputdir <output-dir> --archives qtcore --modules qtbluetooth

If I build and run the current master (ie a5dea634f4c3714a393f9de3e6df6392d5507d43), I get:

INFO    : aqtinstall(aqt) v3.1.15 on Python 3.7.4 [CPython GCC 13.2.0]
WARNING : Failed to download checksum for the file 'Updates.xml'. This may happen on unofficial mirrors.
ERROR   : Failed to locate XML data for Qt version '6.7.0'.
==============================Suggested follow-up:==============================
* Please use 'aqt list-qt linux desktop' to show versions available.

And if I checkout 40721ad2ae197b1fdc03db4c83f15f9dae3d1df0, rebuild, and run the same command, I now get:

INFO    : aqtinstall(aqt) v3.1.16.dev1 on Python 3.7.4 [CPython GCC 13.2.0]
INFO    : Downloading qtbluetooth...
INFO    : Downloading qtcore...
INFO    : Redirected: mirrors.cloud.tencent.com
INFO    : Redirected: mirrors.cloud.tencent.com
WARNING : Extracting may be unsafe; consider updating Python to 3.11.4 or greater
INFO    : Finished installation of qtbluetooth-documentation.tar.xz in 8.70673077
WARNING : Extracting may be unsafe; consider updating Python to 3.11.4 or greater
INFO    : Finished installation of qtcore-documentation.tar.xz in 14.66651355
INFO    : Finished installation
INFO    : Time elapsed: 18.08886567 second

And the request docs appear in the output directory as expected.

I get the same (broken before / fixed after) results for mac too.

Thanks!

miurahr commented 5 months ago

@pcolby @rectalogic has already proposed the fix which is basically same as my approach, but is complete changes.

pcolby commented 5 months ago

Ah I see, well then, thanks both of you! πŸ˜„

pcolby commented 3 months ago

When might we see this in the 3.1.16 release? πŸ™πŸΌπŸ™‚ Although this fix works locally, I'm using install-qt-action in CI, where I can't use this fix until it's released to pip. Releasing 3.1.16 would make my day πŸ˜„ Thanks!

pcolby commented 3 months ago

When might we see this in the 3.1.16 release? πŸ™πŸΌπŸ™‚ Although this fix works locally, I'm using install-qt-action in CI, where I can't use this fix until it's released to pip. Releasing 3.1.16 would make my day πŸ˜„ Thanks!

I see this how now been released, and works perfectly for me! Thank you very much! πŸ˜„