GNOME Bugzilla – Bug 629163
Break dependency between GIO and desktop-file-utils
Last modified: 2017-05-14 21:50:45 UTC
I've compiled glib from tarball and found that issue: The INSTALL file says: Some of the mimetype-related functionality in GIO requires the update-mime-database and update-desktop-database utilities, which are part of shared-mime-info and desktop-file-utils, respectively. but: * The `configure´ script doesn't warn about `shared-mime-info´ or `desktop-file-utils´ absence. * One of the tests fails: ./gio/tests/desktop-app-info because it uses desktop-file-utils functionality. If desktop-file-utils is really needed, it should be included in the standard glib distribution and built with gio, because desktop-file-utils *requires* glib-2.0 to be already installed. If desktop-file-utils is not needed, then what's the reason of having a test that requires it and fails?
The reason for having the test is that we want to test the functionality, obviously. Circular dependencies are a somewhat unfortunate, but fairly normal occurrence in softwrae development. There are many ways to deal with it. I'll leave this bug open to consider adding configure checks for shared-mime-info or desktop-file-utils. Probably not though, since these are really only runtime (or 'make check' time) dependencies
Wouldn't be worth to add those tests on the shared-mime-info or desktop-file-utils packages instead of here? Nothe that the absence of shared-mime-info or desktop-file-utils is blocking the tests, and the failure message doesn't give an obvious reason about why it fails, so I was tempted to not installing glib at all. Another solution would be to simply skip those tests if they detect the absence of those packages. There's no reason to block the remaining tests because of that.
> give an obvious reason about why it > fails, so I was tempted to not installing glib at all. Drastic measure, but to each his own. The main purpose of the tests is to make sure that we produce working tarballs when we run make distcheck for a release. That never happens on a system with essential components missing.
(In reply to comment #3) > The main purpose of the tests is to make sure that we produce working tarballs > when we run make distcheck for a release. That never happens on a system with > essential components missing. I though that make check is for testing that the package was compiled correctly, and if tests fail that's because the compilation failed or there are weird bugs in the compiler, so installing such a package would be risky. If I'm wrong then close this bug, but I think that my petition is reasonable. If some tests are to be executed only for developers, put those tests into special rules for make like the make distcheck that you mentioned.
This also causes us circular dependency problems downstream at Gentoo: http://bugs.gentoo.org/show_bug.cgi?id=286629 Then, fixing this would also benefit us, not only to Jesús ;-)
Looking at the gentoo bug, looks it was fixed in glib-2.28.8 (06 Jun 2011). But if not, probably nobody cares at this point.
We need to manually sed out the test execution in the C file when desktop-file-utils is not present. It would be better if the test itself checked if it's present, and XFAIL it if it's not, instead of FAILing.