xdg-mime will throw an error without qt5-tools installed
Description:
When calling xdg-mime, you get an error if qt5-tools is not installed:
/usr/bin/xdg-mime: line 885: qtpaths: command not found
Additional info:
- package version(s): 1.2.1-1
- config and/or log files: n/a
- link to upstream bug report, if any: freedesktop/xdg-utils#258
Issue caused by xdg-mime calling qtpaths from $PATH but with Qt6-only installation there will be no qtpaths in $PATH.
qt5-tools contains /usr/bin/{qtpaths,qtpaths-qt5} while qt6-base only has /usr/lib/qt6/bin/{qtpaths,qtpaths6} which makes them inaccessible for xdg-mime.
Couple things to note:
- Debian makes
qtpaths6accessible from/usr/bin/qtpaths6(but it xdg-mime will not use it anyway) -
qtpathsis available fromqtchooserwhich is version-agnostic
Given all of the above I don't know whose issue it is: xdg-mime, qt6 or the way arch packages qt versions. But since the issue itself comes from xdg-mime it's filed here.
Important thing is that it can't be "solved" by making qt5-tools as xdg-utils optional dependency. Since KDE provided by Arch is based on Qt6 you don't need Qt5 and qt5-tools. Also qt6 already contains qtpaths, just not where you can access it.
Steps to reproduce:
$ xdg-mime default ...