Skip to content
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

fix source/doc/examples with qstkdrepo changes. #857

Merged
merged 6 commits into from
Dec 21, 2024

Conversation

tsteven4
Copy link
Contributor

This handles all_os/qt/qt6_xyz_src_doc_examples changing to all_os/qt/qt6/xyz/[unix|windows]_line_endings_src for both list and install commands.

This resolves #843

This handles all_os/qt/qt6_xyz_src_doc_examples changing
to all_os/qt/qt6/xyz/[unix|windows]_line_endings_src
for both list and install commands.
@Kidev
Copy link
Contributor

Kidev commented Dec 18, 2024

This will clash massively with #846

Edit: maybe not since its for install-src... Scared to find out though, or even check, as the missing doubling folder was one of the issue

@tsteven4
Copy link
Contributor Author

It fixes issues with: install-src, install-example, install-doc, list-src, list-example, list-doc

@Kidev
Copy link
Contributor

Kidev commented Dec 18, 2024

@tsteven4 Changes to to_folder may clash after review. Can you try to get it to work from #846 ? It entirely works since a few days, the latest changes are related to CI

This is my version, does it fix your issue already? It may

def to_folder(self, version: Version, qt_version_no_dots: str, extension: Optional[str] = None) -> str:
    if version >= Version("6.8.0"):
        if self.target == "wasm":
            # Qt 6.8+ WASM uses a split folder structure
            folder = f"qt{version.major}_{qt_version_no_dots}"
            if extension:
                folder = f"{folder}/{folder}_{extension}"
            return folder
        else:
            base = f"qt{version.major}_{qt_version_no_dots}"
            return f"{base}/{base}" # HERE
    elif version >= Version("6.5.0") and self.target == "wasm":
        # Qt 6.5-6.7 WASM uses direct wasm_[single|multi]thread folder
        if extension:
            return f"qt{version.major}_{qt_version_no_dots}_{extension}"
        return f"qt{version.major}_{qt_version_no_dots}"
    # Pre-6.8 structure for non-WASM or pre-6.5 structure
    return "{category}{major}_{ver}{ext}".format(
        category=self.category,
        major=qt_version_no_dots[0],
        ver=qt_version_no_dots,
        ext="_" + extension if extension else "",
    )

@tsteven4
Copy link
Contributor Author

This is my version, does it fix your issue already? It may

@Kidev Your change to to_folder breaks my fix for source/doc/examples. When we get src/doc/example listings from all_os/qt (>= 6.7.0) we need to use the old style path WITH the extension. Your change works for 6.7.*, but not >=6.8.0. A merge of to_folder will be required.

$ aqt list-example linux 6.8.1
ERROR   : Failed to download checksum for the file 'Updates.xml' from mirrors '['https://download.qt.io']
==============================Suggested follow-up:==============================
* Check your internet connection
* Consider modifying `requests.max_retries_to_retrieve_hash` in settings.ini
* Consider modifying `mirrors.trusted_mirrors` in settings.ini (see https://aqtinstall.readthedocs.io/en/stable/configuration.html#configuration)
usage: aqt [-h] [-c CONFIG]
           {install-qt,install-tool,install-doc,install-example,install-src,list-qt,list-tool,list-doc,list-example,list-src,help,version} ...

Another unofficial Qt Installer.
aqt helps you install Qt SDK, tools, examples and others

options:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        Configuration ini file.

subcommands:
  aqt accepts several subcommands:
  install-* subcommands are commands that install components
  list-* subcommands are commands that show available components

  {install-qt,install-tool,install-doc,install-example,install-src,list-qt,list-tool,list-doc,list-example,list-src,help,version}
                        Please refer to each help message by using '--help' with each subcommand
(aqttest-venv) tsteven4@PEDALDAMNIT:~/work/tsaqt$ tail aqtinstall.log
2024-12-18 01:41:24,709 - aqt.helper - DEBUG - helper 140359476011136 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/all_os/qt/qt6_681/qt6_681/Updates.xml.sha256
2024-12-18 01:41:25,356 - aqt.helper - DEBUG - helper 140359476011136 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/all_os/qt/qt6_681/qt6_681/Updates.xml.sha256
2024-12-18 01:41:26,153 - aqt.helper - DEBUG - helper 140359476011136 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/all_os/qt/qt6_681/qt6_681/Updates.xml.sha256
2024-12-18 01:41:26,792 - aqt.helper - DEBUG - helper 140359476011136 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/all_os/qt/qt6_681/qt6_681/Updates.xml.sha256
2024-12-18 01:41:27,449 - aqt.helper - DEBUG - helper 140359476011136 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/all_os/qt/qt6_681/qt6_681/Updates.xml.sha256
2024-12-18 01:41:28,092 - aqt.main - ERROR - installer 140359476011136 Failed to download checksum for the file 'Updates.xml' from mirrors '['https://download.qt.io']
==============================Suggested follow-up:==============================
* Check your internet connection
* Consider modifying `requests.max_retries_to_retrieve_hash` in settings.ini
* Consider modifying `mirrors.trusted_mirrors` in settings.ini (see https://aqtinstall.readthedocs.io/en/stable/configuration.html#configuration)

I tested this PR with this your change to to_folder:

$ git diff
diff --git a/aqt/metadata.py b/aqt/metadata.py
index 3783101..4c76c98 100644
--- a/aqt/metadata.py
+++ b/aqt/metadata.py
@@ -276,20 +276,28 @@ class ArchiveId:
         )

     def to_folder(self, version: Version, qt_version_no_dots: str, extension: Optional[str] = None) -> str:
-        if (version >= Version("6.8.0")) and not ((self.host == "all_os") and (self.target == "qt")):
-            return "{category}{major}_{ver}/{category}{major}_{ver}{ext}".format(
-                category=self.category,
-                major=qt_version_no_dots[0],
-                ver=qt_version_no_dots,
-                ext="_" + extension if extension else "",
-            )
-        else:
-            return "{category}{major}_{ver}{ext}".format(
-                category=self.category,
-                major=qt_version_no_dots[0],
-                ver=qt_version_no_dots,
-                ext="_" + extension if extension else "",
-            )
+        if version >= Version("6.8.0"):
+            if self.target == "wasm":
+                # Qt 6.8+ WASM uses a split folder structure
+                folder = f"qt{version.major}_{qt_version_no_dots}"
+                if extension:
+                    folder = f"{folder}/{folder}_{extension}"
+                return folder
+            else:
+                base = f"qt{version.major}_{qt_version_no_dots}"
+                return f"{base}/{base}"
+        elif version >= Version("6.5.0") and self.target == "wasm":
+            # Qt 6.5-6.7 WASM uses direct wasm_[single|multi]thread folder
+            if extension:
+                return f"qt{version.major}_{qt_version_no_dots}_{extension}"
+            return f"qt{version.major}_{qt_version_no_dots}"
+        # Pre-6.8 structure for non-WASM or pre-6.5 structure
+        return "{category}{major}_{ver}{ext}".format(
+            category=self.category,
+            major=qt_version_no_dots[0],
+            ver=qt_version_no_dots,
+            ext="_" + extension if extension else "",
+        )

     def all_extensions(self, version: Version) -> List[str]:
         if self.target == "desktop" and QtRepoProperty.is_in_wasm_range(self.host, version):

@tsteven4 tsteven4 mentioned this pull request Dec 18, 2024
Copy link
Owner

@miurahr miurahr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are several linter warnings reported. Could you improve the code style and a usage of Version?

@tsteven4
Copy link
Contributor Author

locally pylint 3.3.2 comes up with 168 issues in metadata.py. Perhaps reviewdog is only showing ones that overlap changes in the file. 55 of these are "line to long". .flake8 sets the max line length to 125, but pylint seems to use 100.

@miurahr
Copy link
Owner

miurahr commented Dec 19, 2024

locally pylint 3.3.2 comes up with 168 issues in metadata.py. Perhaps reviewdog is only showing ones that overlap changes in the file. 55 of these are "line to long". .flake8 sets the max line length to 125, but pylint seems to use 100.

OK, I see. I do check the configuration of pylint and the PR looks good.

@miurahr miurahr merged commit f914397 into miurahr:master Dec 21, 2024
53 checks passed
@tsteven4 tsteven4 deleted the newsdefolders branch December 21, 2024 02:01
pcolby added a commit to pcolby/dokit that referenced this pull request Jan 2, 2025
At least until the fix for #843 is released (presumably in
aqtinstall 3.1.22).

See miurahr/aqtinstall#843 and
miurahr/aqtinstall#857.
pcolby added a commit to pcolby/dokit that referenced this pull request Jan 2, 2025
Squashed commit of the following:

commit 693f19c
Author: Paul Colby <git@colby.id.au>
Date:   Mon Jan 1 18:13:46 2024 +1100

    Continue to exclude Qt 6.x with GCC on macOS

commit a6c3a5c
Author: Paul Colby <git@colby.id.au>
Date:   Mon Jan 1 18:09:15 2024 +1100

    Include the required QRegularExpression header

commit 6f078e5
Author: Paul Colby <git@colby.id.au>
Date:   Mon Jan 1 18:08:54 2024 +1100

    Some fixes / tweaks for Qt 6.8.1 and 6.9.0

commit 49be473
Author: Paul Colby <git@colby.id.au>
Date:   Mon Jan 1 18:04:45 2024 +1100

    Correct the referenced Qt version

commit eef0aaa
Author: Paul Colby <git@colby.id.au>
Date:   Mon Jan 1 18:04:40 2024 +1100

    Use aqtinstall HEAD for Qt 6.8.1 and 6.8.0 support

    At least until the fix for #843 is released (presumably in
    aqtinstall 3.1.22).

    See miurahr/aqtinstall#843 and
    miurahr/aqtinstall#857.

commit fe107e7
Merge: 24016a1 4507ccc
Author: Paul Colby <git@colby.id.au>
Date:   Mon Jan 1 18:00:00 2024 +1100

    Merge branch 'main' into qt-6.8.1

commit 24016a1
Merge: 8571331 968e509
Author: Paul Colby <git@colby.id.au>
Date:   Sun Dec 29 11:25:00 2024 +1100

    Merge branch 'main' into qt-6.8.1

commit 8571331
Author: Paul Colby <git@colby.id.au>
Date:   Thu Dec 26 18:32:54 2024 +1100

    Try Qt 6.9.0 (currently beta)

commit 9e2a846
Merge: 551ee79 c3e649c
Author: Paul Colby <git@colby.id.au>
Date:   Thu Dec 26 18:30:08 2024 +1100

    Merge branch 'main' into qt-6.8.1

commit 551ee79
Merge: f261069 5c65691
Author: Paul Colby <git@colby.id.au>
Date:   Sun Dec 22 23:01:23 2024 +1100

    Merge branch 'more-tee' into qt-6.8.1

commit f261069
Author: Paul Colby <git@colby.id.au>
Date:   Tue Dec 3 19:18:01 2024 +1100

    Upgrade to Qt 6.8.1
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]: Fails to install-src for Qt 6.8.1 on Linux
3 participants