<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 3, 2016 at 5:16 AM, Daniel Vrátil <span dir="ltr"><<a href="mailto:dvratil@kde.org" target="_blank">dvratil@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sunday, April 3, 2016 12:58:24 PM CEST David Faure wrote:<br>
> On Sunday 03 April 2016 12:43:27 Daniel Vrátil wrote:<br>
> > Turns out when you include /usr/share in XDG_DATA_DIRS, all mime types<br>
> > that<br>
> > might have been provided by other dependencies in<br>
> > /srv/jenkins/.../foo/inst/ usr/share/mime are ignored, possibly due to<br>
> > update-mime-database not being ran for those directories.<br>
><br>
> I'm not sure I fully understand this sentence. Do you mean the value of<br>
> XDG_DATA_DIRS at update-mime-database time or during the running of unit<br>
> tests?<br>
<br>
</span>XDG_DATA_DIRS value when running the unit tests.<br>
<span class=""><br>
> update-mime-database works on one specific install dir and creates files<br>
> there. The value of XDG_DATA_DIRS during the run of update-mime-database<br>
> shouldn't matter.<br>
><br>
> If the stuff /srv/jenkins/.../foo/inst/usr/share/mime is ignored, it can be<br>
> either<br>
<br>
> 1) because update-mime-database wasn't run on that dir<br>
>    (which is my current hypothesis for the KIO kfileitemtest failure which<br>
> needs a mimetype from kcoreaddons)<br>
<br>
</span>The thing is that the content of /srv/jenkins/.../foo/inst/usr/share/mime is<br>
NOT ignored, when /usr/share is NOT in XDG_DATA_DIRS.<br>
<br>
Once you include /usr/share in XDG_DATA_DIRS, the content of the /srv/.../mime<br>
folders IS ignored.<br>
<br>
Akonadi installs a mime file to share/mime/packages/akonadi-mime.xml which<br>
introduces some new mimetypes and are used to find the right serialize plugins<br>
for those types. With /usr/share in XDG_DATA_DIRS Akonadi is not able to find<br>
serializer plugins for application/x-vnd.akonadi.calendar.todo for instance,<br>
because it (using QMimeDatabase) does not know about this mime type. Removing<br>
/usr/share from XDG_DATA_DIRS makes Akonadi (QMimeDatabase) find application/<br>
x-vnd.akonadi.calendar.todo just find and thus find a respective serializer<br>
plugin for the type.<br>
<span class=""><br>
<br>
> 2) because that dir isn't in<br>
> XDG_DATA_DIRS (this is not the problem) later on.<br>
<br>
</span>I verified that it is there.<br>
<span class=""><br>
> 3) because<br>
> update-mime-database ran but didn't create the stuff it's supposed to<br>
> create -- I understand your email as saying this might be the problem, but<br>
> I can't confirm it:<br>
<br>
</span>If I compare output of "make install" from CI and running it locally, it<br>
indeed appears that update-mime-database is not run on the CI at all:<br>
<br>
CI:<br>
16:22:17 Install the project...<br>
16:22:17 -- Install configuration: "Debug"<br>
16:22:17 -- Installing: /home/jenkins/sources/akonadi/kf5-qt5/local-inst/srv/<br>
jenkins/install/ubuntu/x86_64/g++/kf5-qt5/kde/pim/akonadi/inst/usr/share/mime/<br>
packages/akonadi-mime.xml<br>
16:22:17 -- Installing: /home/jenkins/sources/akonadi/kf5-qt5/local-inst/srv/<br>
jenkins/install/ubuntu/x86_64/g++/kf5-qt5/kde/pim/akonadi/inst/usr/lib/x86_64-<br>
linux-gnu/cmake/KF5Akonadi/KF5AkonadiConfig.cmake<br>
<br>
<br>
Locally:<br>
-- Install configuration: "Debug"<br>
-- Up-to-date: /opt/kde-devel/share/mime/packages/akonadi-mime.xml<br>
-- Updating MIME database at /opt/kde-devel/share/mime<br>
-- Up-to-date: /opt/kde-devel/lib64/cmake/KF5Akonadi/KF5AkonadiConfig.cmake<br>
<span class=""><br>
><br>
> on my own system, I have /usr/share/mime/packages/kde.xml defining<br>
> application/x-smb-workgroup and /usr/share in XDG_DATA_DIRS, and yet<br>
> running update-mime-database on /d/kde/inst/kde_frameworks/share/mime<br>
> creates<br>
> /d/kde/inst/kde_frameworks/share/mime/application/x-smb-workgroup.xml as<br>
> expected.<br>
> > I manually ran update-mime-database on the akonadi and kdepim-runtime<br>
> > install dirs on Jenkins and the Zanshin tests magically started passing<br>
> > again.<br>
> Yes, which only proves that the problem was that it didn't run, not that the<br>
> value of XDG_DATA_DIRS is the problem.<br>
><br>
> > Our idea for a quick dirty fix was to simply run update-mime-database once<br>
> > CI sets up the environment variables but before the test is executed.<br>
> ><br>
> > David, do you have any better suggestions?<br>
><br>
> Yes, I'd like to know why "make install" in e.g. kcoreaddons doesn't seem to<br>
> run update-mime-database on CI while it does here (and given that<br>
> update-mime-database *is* found in the CI).<br>
> With the new CI I'm having trouble debugging this, there are no sources and<br>
> build dirs from previous runs anymore :-)<br>
<br>
</span>update-mime-database  seems to be run by ECM, the documentation says<br>
<br>
        # The follow macro is available::<br>
        #<br>
        #   update_xdg_mimetypes(<path>)<br>
        #<br>
        # Updates the XDG mime database at install time (unless the ``$DESTDIR``<br>
        # environment variable is set, in which case it is up to package managers<br>
to<br>
        # perform this task).<br>
<br>
I suspect that CI uses "make DESTDIR=/srv/jenkins/...../foo/inst install" to<br>
install stuff, thus not triggering the update, as documented and it's up to<br>
the CI script to run it manually....<br>
<br></blockquote><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dan<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>Sorry I have not been more responsive. I am visiting family and have been traveling.<br></div><div>I think I found the issue. The function that checks whether our scripts should run it was not looking in /usr/share/mime<br></div><div>Just commited a fix. <br></div><div>Scarlett<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
--<br>
Daniel Vrátil<br>
<a href="http://www.dvratil.cz" rel="noreferrer" target="_blank">www.dvratil.cz</a> | <a href="mailto:dvratil@kde.org">dvratil@kde.org</a><br>
IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)</div></div><br>_______________________________________________<br>
Kde-frameworks-devel mailing list<br>
<a href="mailto:Kde-frameworks-devel@kde.org">Kde-frameworks-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-frameworks-devel" rel="noreferrer" target="_blank">https://mail.kde.org/mailman/listinfo/kde-frameworks-devel</a><br>
<br></blockquote></div><br></div></div>