Handing QML dependencies
Lisandro Damián Nicanor Pérez Meyer
perezmeyer at gmail.com
Fri Oct 4 19:02:04 BST 2024
On Tue, 1 Oct 2024 at 17:52, Hefee <hefee at debian.org> wrote:
>
> Hey,
>
> I finally finished pkgkde-getqmldepends to a point where it begins to become
> usable *yeah* I already successfully added it to itinerary, kosmindoormap,
> kweather and I helped using it in neochat and kasts.
>
> How to use it currently:
>
> add to d/rules (you need to catch all qml files shipped with the package):
>
> execute_before_dh_gencontrol:
> pkgkde-getqmldepends --qt 6 -- -qrcFiles src/app/qml.qrc -qmlFiles
> src/app/*qml
>
> and you need to add in d/control in Depends:
> Depends: ${qml6:Depends}
>
> that's basically it.
Nice!
> BUT (there is alsways a but ;)
>
> it only can create the dependency list, if the qml modules are installed while
> building. That is because I need to translate the qml module name to a file
> path and need to check, what package provides to that path. I cannot guess the
> package name, as some qml modules split the packages into smaller chunks (e.g.
> kirigami-addons) or ship muliple qml modules( e.g. kosmindoormap that ships
> org.kde.kosmindoormap and org.kde.kosmindoormap.kpublictransport).
>
> So my current proposal is: If we would make sure, that all dev packages will
> depend on the qml modules, than we would reduce the list of additional qml
> modules in build-depends to only those that are only used in qml.
> Btw. also I think a normal developer that want to create an app may be happy
> to get also the qml modules by installing a -dev package. As they can either
> create a C++ app or a QML app or a hybrid one.
>
> So what do you think about the idea to add the qml modules by default as
> dependency to the -dev packages. Sure their may be some reasons for some
> packages, to decide against this rule.
With my umarell hat on:
Interesting. So far we have avoided doing that as much as possible
because there is no way QML files are needed upon build time, thus
reducing build space, there was no benefit. Now there is a tangible
benefit for this. This could also mean we can keep the CMake files
that look for specific QML plugins to be available upon build time...
but this might make some apps FTBFS, which might be fixed with a
proper unstable rebuild (ask Lucas IIRC) + transition.
I would personally say "Go for it, and if someone complains then let
them provide a workaround".
More information about the pkg-kde-talk
mailing list