SUMMARY archlinux packages are now compressed by default with zstd and file names have extensions *.pkg.tar.zst Apparently ark does recognize files *.tar.zst as zstd compressed tar-archives, but not with leading *.pkg* STEPS TO REPRODUCE Archive > open > set filter to "Tar archive (zstd-compressed)" or even to 'All supported files' will not display any files matching *.pkg.tar.zst OR Trying to open a file with extension *.pkg.tar.zst will show "failed with the following error: No suitable plugin found. Ark does not seem to support this file type." while of course libarchive plugin is installed and active. When I remove the '.pkg' bit from the file name, the archive with extension *.tar.zst is handled just fine. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Manjaro Linux 18.1.5 (available in About System) KDE Plasma Version: 5.17.5 KDE Frameworks Version: 5.65.0 Qt Version: 5.14.0
Works for me. Can you run: QT_LOGGING_RULES="ark.*.debug=true" ark and post here the output?
This gives me: ark.kerfuffle: Mimetype for filename extension ( "application/x-alpm-package" ) did not match mimetype for content ( "application/zstd" ). Using content-based mimetype. ark.kerfuffle: Could not find a plugin to handle "foo.pkg.tar.zst"
(In reply to Bernhard Landauer from comment #2) > This gives me: > > ark.kerfuffle: Mimetype for filename extension ( > "application/x-alpm-package" ) This is the problem. Your *.pkg.tar.zst files are being detected with this mimetype, which is not supported by Ark. From a quick google search, application/x-alpm-package seems to be a Manjaro-specific mimetype installed by their pamac tool. Since they associate this mimetype to multiple glob patterns (no idea why), I don't think we can support it from the Ark side.
This is not Manjaro specific, since Archlinux has switched to this new package format, all Arch-based distros will have the same issue.
I don't know, I'm on arch and I don't have that mimetype installed. Do you have some reference link?
*** Bug 419058 has been marked as a duplicate of this bug. ***
https://gitlab.manjaro.org/applications/pamac/-/blob/master/data/mime/x-alpm-package.xml Yes this is manjaro specific, made for the GUI package manager to install stuff just with a click. But I'm missing why Ark could not fallback to trying anyway with magic sniffing or extension matching, or ship itself with a supported MIME types xml? https://specifications.freedesktop.org/shared-mime-info-spec/latest/ar01s02.html#idm46096015324960
The manjaro-specific mimetype should inherit a supported mimetype, probably application/x-tar. Then ark should be able to open those files.
(In reply to Elvis Angelaccio from comment #8) > The manjaro-specific mimetype should inherit a supported mimetype, probably > application/x-tar. Then ark should be able to open those files. I have tried this with a custom mimetype defined in ~/.local/share/mime/packages/Override.xml`, but Ark still wouldn’t open my files. I have also created an issue on the Pamac bug tracker for this issue: https://gitlab.manjaro.org/applications/pamac/-/issues/902 LOG $ QT_LOGGING_RULES="ark.*.debug=true" ark <file>.pkg.tar.zst ark.main: Trying to open QUrl("file://<file>.pkg.tar.zst") ark.part: Attempting to open archive "<file>.pkg.tar.zst" ark.kerfuffle: Going to create archive "<file>.pkg.tar.zst" ark.kerfuffle: Validated filename of compressed tar "<file>.pkg.tar.zst" into filename "<file>.pkg.tar.zst" ark.kerfuffle: Mimetype for filename extension ( "application/x-zstd-compressed-alpm-package" ) did not match mimetype for content ( "application/zstd" ). Using content-based mimetype. ark.kerfuffle: Could not find a plugin to handle "<file>.pkg.tar.zst" ark.kerfuffle: Created archive instance with error ark.kerfuffle: Created job instance ark.main: Entering application loop ark.kerfuffle: Job finished, result: false , time: 4 ms MIMETYPE <mime-type type="application/x-zstd-compressed-alpm-package"> <comment>ALPM Package (Zstandard-compressed)</comment> <generic-icon name="package-x-generic" /> <sub-class-of type="application/x-alpm-package" /> <sub-class-of type="application/x-zstd-compressed-tar" /> <glob pattern="*.pkg.tar.zst" weight="55" /> </mime-type>
I have looked through the Ark sources and I believe these lines are the reason the solution using custom mimetypes does not work: https://github.com/KDE/ark/blob/108ade3b57f1eca792a54843e9c646eb1322a7ef/kerfuffle/mimetypes.cpp#L96 Would it be possible to change these lines (mimeFromExtension == db.mimeTypeForName(QStringLiteral("...")) && to lines like this? (mimeFromExtension.inherits(db.mimeTypeForName(QStringLiteral("..."))) && Note the use of inherits() instead of operator==().
Does it work if you use this instead? <sub-class-of type="application/x-tar" />
(In reply to Elvis Angelaccio from comment #11) > Does it work if you use this instead? > > <sub-class-of type="application/x-tar" /> It does not. It fails with the same log output I posted in comment #9 (minus the custom mimetype of course). This was one of the first things I tried, but I forgot to mention it. I have however found a fix that is working for me. I have created custom application/x-*-compressed-alpm-package mimetypes that inherit from both application/x-alpm-package and application/x-*-compressed-tar and have patched Ark to change these lines (mimeFromExtension == db.mimeTypeForName(QStringLiteral("...")) && into these lines (mimeFromExtension.inherits(QStringLiteral("...")) && in https://github.com/KDE/ark/blob/108ade3b57f1eca792a54843e9c646eb1322a7ef/kerfuffle/mimetypes.cpp#L96. Software/OS Versions: Linux Version: Manjaro 20.1.2 KDE Plasma Version: 5.19.5 KDE Frameworks Version: 5.74.0 Qt Version: 5.15.1 Ark Version: 20.08.1
(In reply to o.hase3 from comment #12) > (In reply to Elvis Angelaccio from comment #11) > > Does it work if you use this instead? > > > > <sub-class-of type="application/x-tar" /> > > It does not. It fails with the same log output I posted in comment #9 (minus > the custom mimetype of course). This was one of the first things I tried, > but I forgot to mention it. > > I have however found a fix that is working for me. I have created custom > application/x-*-compressed-alpm-package mimetypes that inherit from both > application/x-alpm-package and application/x-*-compressed-tar and have > patched Ark to change these lines > (mimeFromExtension == db.mimeTypeForName(QStringLiteral("...")) && > into these lines > (mimeFromExtension.inherits(QStringLiteral("...")) && > in > https://github.com/KDE/ark/blob/108ade3b57f1eca792a54843e9c646eb1322a7ef/ > kerfuffle/mimetypes.cpp#L96. > > Software/OS Versions: > Linux Version: Manjaro 20.1.2 > KDE Plasma Version: 5.19.5 > KDE Frameworks Version: 5.74.0 > Qt Version: 5.15.1 > Ark Version: 20.08.1 Feel free to submit a Merge Request with this patch and we'll see if it makes sense to merge upstream.
I have created a merge request with this patch. See https://invent.kde.org/utilities/ark/-/merge_requests/22.
(In reply to o.hase3 from comment #14) > I have created a merge request with this patch. > See https://invent.kde.org/utilities/ark/-/merge_requests/22. Thank you for the patch. If you mention in the description of the MR "BUG 416092" it will automatically update the bug you mention. :)
(In reply to o.hase3 from comment #14) > I have created a merge request with this patch. > See https://invent.kde.org/utilities/ark/-/merge_requests/22. Merged, thanks.
Not really fixed as you can see in the last comments of the MR.
(In reply to mirh from comment #17) > Not really fixed as you can see in the last comments of the MR. Which comments?
(In reply to Elvis Angelaccio from comment #18) > (In reply to mirh from comment #17) > > Not really fixed as you can see in the last comments of the MR. > > Which comments? https://invent.kde.org/utilities/ark/-/merge_requests/22#note_176062