Hi, I use net-p2p/qbittorrent USE=-X on a headless system. However, ever since this application uses system's qtsingleapplication, qtgui is pulled as part of qtsingleapplications's dependencies and this also pulls numerous useless X libraries which makes no sense on such a system. I am not sure what's the correct path is here but this scenario does not quite fit my needs very well. Is there absolutely no way to make qtsingleapplication not use QtGui? Given it was bundled in qbittorrent and worked without QtGui I suspect there is a way to do that. I would like to revert #487560 and make the use of system's qtsingleapplication optional until someone comes up with a better solution.
The other alternative is to have something like this in the src_configure in qbittorrent if use X; then myconf+=" --with-qtsingleapplication=system" else myconf+=" --disable-gui" fi
My understanding is that the qtsingleapplication has only effects in gui applications so it's correct that it pulls dev-qt/qtgui unconditionally. If that's true, then the way i have it implemented in qbittorrent is wrong and it should in fact depend on the X flag.
May be ask upstream?
(In reply to Nikoli from comment #3) > May be ask upstream? What upstream and ask them about what?
Created attachment 363414 [details] build.log With X enabled qbittorrent-3.1.2 builds fine, but if it is disabled - build fails. dev-qt/qtsingleapplication-2.6.1 was installed. > What upstream and ask them about what? qbittorrent. Ask about building it in headless mode: does it need qtsingleapplication or not? Does it support system qtsingleapplication?
(In reply to Nikoli from comment #5) > Created attachment 363414 [details] > build.log > > With X enabled qbittorrent-3.1.2 builds fine, but if it is disabled - build > fails. dev-qt/qtsingleapplication-2.6.1 was installed. > > > > What upstream and ask them about what? > > qbittorrent. Ask about building it in headless mode: does it need > qtsingleapplication or not? Does it support system qtsingleapplication? Given that your build.log for USE=-X seems to suggest that qtsingleapplication is used then what's the question to ask? The problem here is not whether systems' qtsingleapplication can be used in headless mode or not but that qtsingleapplication pulls so many useless dependencies in headless mode that it make it unusable for headless systems.
I agree that requiring qtgui for building headless daemon is wrong, but may be upstream tries to use qtsingleapplication by mistake when building with -X.
qtsingleapplication contains also a QtSingleCoreApplication class that has no GUI dependencies. However the consumer application must explicitly use this class instead of QtSingleApplication otherwise it's pointless... is this the case for qbittorrent[-X]?
Yes that is the case hwoarang@helix /var/tmp/portage/net-p2p/qbittorrent-3.1.2/work/qbittorrent-3.1.2 $ grep -r QtSingleCoreApplication src/main.cpp QtSingleCoreApplication app("qBittorrent-"+uid, argc, argv); this part of the code is between an #ifdef DISABLE_GUI block which is used when using -X.
Opened https://github.com/qbittorrent/qBittorrent/issues/1118 but the real problem on this bug remains. Since qtsingleapplication does not *always* need GUI classes, it should not pull qt-gui unconditionally.
(In reply to Markos Chandras from comment #10) > Opened > > https://github.com/qbittorrent/qBittorrent/issues/1118 > I believe the above bug is actually invalid as a qbittorrent bug. The real issue is that we don't currently install that header file. So it's a packaging bug. > but the real problem on this bug remains. Since qtsingleapplication does not > *always* need GUI classes, it should not pull qt-gui unconditionally. Agreed. In fact there are 2 different issues here: 1/ QtSingleCoreApplication is not built and its headers not installed 2/ the hard-dep on qtgui could/should actually be made optional
(In reply to Davide Pesavento from comment #11) > (In reply to Markos Chandras from comment #10) > > Opened > > > > https://github.com/qbittorrent/qBittorrent/issues/1118 > > > > I believe the above bug is actually invalid as a qbittorrent bug. The real > issue is that we don't currently install that header file. So it's a > packaging bug. > Sorry I didn't realize that we don't installed the required header. I will close it as invalid. > > but the real problem on this bug remains. Since qtsingleapplication does not > > *always* need GUI classes, it should not pull qt-gui unconditionally. > > Agreed. In fact there are 2 different issues here: > > 1/ QtSingleCoreApplication is not built and its headers not installed > > 2/ the hard-dep on qtgui could/should actually be made optional
In the meantime i added a workaround on the ebuilds to use the bundled qtsingleapplication for -X http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-p2p/qbittorrent/qbittorrent-9999.ebuild?r1=1.11&r2=1.12
Fixed in qtsingleapplication-2.6.1_p20130904. 28 Dec 2013; Davide Pesavento <pesa@gentoo.org> +files/2.6.1_p20130904-no-gui.patch, +files/2.6.1_p20130904-unbundle-qtlockedfile.patch, +qtsingleapplication-2.6.1_p20130904.ebuild: New snapshot from qt-solutions git repo wrt bug 489168. Install QtSingleCoreApplication header file. Implement USE="X" to solve bug 491494. @Markos, please revert the workaround in qbittorrent and add a proper USE-dep.
(In reply to Davide Pesavento from comment #14) > Fixed in qtsingleapplication-2.6.1_p20130904. > > 28 Dec 2013; Davide Pesavento <pesa@gentoo.org> > +files/2.6.1_p20130904-no-gui.patch, > +files/2.6.1_p20130904-unbundle-qtlockedfile.patch, > +qtsingleapplication-2.6.1_p20130904.ebuild: > New snapshot from qt-solutions git repo wrt bug 489168. Install > QtSingleCoreApplication header file. Implement USE="X" to solve bug 491494. > > > @Markos, please revert the workaround in qbittorrent and add a proper > USE-dep. I will fix 9999 for now and remove the workaround completely on the next version bump. Thanks for fixing it.