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

[Bug]: 6.8.1 installations fail, improper archive unpacking #840

Closed
1 task done
tsteven4 opened this issue Nov 30, 2024 · 2 comments · Fixed by #841
Closed
1 task done

[Bug]: 6.8.1 installations fail, improper archive unpacking #840

tsteven4 opened this issue Nov 30, 2024 · 2 comments · Fixed by #841
Labels
bug Something isn't working triage

Comments

@tsteven4
Copy link
Contributor

Bug description

In 6.8.1 Updates.xml files PackageUpdate elements can contain an Operations element. These can contain Operation elements with attribute Extract, which in turn contain Argument elements that contain the target directory for extraction as well as the name of the 7z file.

For example see https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_681/qt6_681/Updates.xml

aqtinstall doesn't handle these optional elements, instead unpacking everything assuming the path names are stored in the 7z file. This is no longer true for 7z archives in 6.8.1.

aqt install-qt linux desktop 6.8.1 linux_gcc_64 -O /tmp/Qt -m qt3d qt5compat qtconnectivity qtimageformats qtlanguageserver qtlocation qtmultimedia qtpdf qtpositioning qtquickeffectmaker qtremoteobjects qtscxml qtsensors qtserialbus qtserialport qtspeech qtwebchannel qtwebengine qtwebsockets qtwebview
leads to
ERROR : Updater caused an IO error: [Errno 2] No such file or directory: '/tmp/Qt/6.8.1/gcc_64/mkspecs/qconfig.pri'
This would seem to be caused by unpacking all archives in the wrong place. All 7z archives are unpacked to the directory supplied in the command line, missing at a minimum the usual version/compiler/ path component, in this case we would have expected everything to go to /tmp/Qt/6.8.1/gcc_64/. Thee missing pathname components appear to all be given in Argument elements. Note these missing pathname components may contain additional subdirectories besides the version/compiler components, for example icu-linux-Rhel8.6-x86_64.7z should have been unpacked to @TargetDir@/6.8.1/gcc_64/lib.

$ ls /tmp/Qt
bin      lib               libicudata.so.73.2  libicuio.so.73    libicutest.so.73.2  libicuuc.so.73    mkspecs      plugins    sbom
doc      libexec           libicui18n.so.73    libicuio.so.73.2  libicutu.so.73      libicuuc.so.73.2  modules      qml        translations
include  libicudata.so.73  libicui18n.so.73.2  libicutest.so.73  libicutu.so.73.2    metatypes         phrasebooks  resources

Note I was testing with code from #838 but this should be reproducible with released code if one omits the modules qtwebengine and qtpdf which are extensions in 6.8 (#803).

Expected behavior

A correct directory structure, in the example in /tmp/Qt/6.8.1/gcc_64.

aqt and python version

aqtinstall(aqt) v1.2.0b3.dev1123 on Python 3.12.3 [CPython GCC 13.2.0]

Operating System

Linux/Unix

Relevant log output

2024-11-30 06:56:17,513 - aqt.main - ERROR - installer 139666317992064 Updater caused an IO error: [Errno 2] No such file or directory: '/tmp/Qt/6.8.1/gcc_64/mkspecs/qconfig.pri'
2024-11-30 07:28:08,466 - aqt.main - INFO - installer 140246693441664 aqtinstall(aqt) v1.2.0b3.dev1123 on Python 3.12.3 [CPython GCC 13.2.0]

Code of Conduct

  • I agree to follow this project's Code of Conduct
@tsteven4 tsteven4 added bug Something isn't working triage labels Nov 30, 2024
@jdpurcell
Copy link
Contributor

In case it helps anyone, these changes worked for me. I'm not confident with the code quality as I'm mostly unfamiliar with Python and some of it is AI-generated, but it at least seems to function okay.

@miurahr
Copy link
Owner

miurahr commented Dec 1, 2024

I would like to merge #841 and then try to merge another PRs

miurahr added a commit that referenced this issue Dec 1, 2024
Handle Updates.xml Operation extract elements. Fix the issue #840
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants