Summary: | dev-libs/glib-2.30.0 fails tests | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Pacho Ramos <pacho> |
Component: | [OLD] GNOME | Assignee: | Gentoo Linux Gnome Desktop Team <gnome> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | python |
Priority: | Normal | Keywords: | TESTFAILURE |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
patch for glib-2.30.0.ebuild to fix tests patch for glib-2.30.0.ebuild to fix tests |
Description
Pacho Ramos
2011-09-28 22:21:30 UTC
Created attachment 288135 [details]
build.log
Created attachment 288171 [details, diff] patch for glib-2.30.0.ebuild to fix tests Confirming. I didn't notice the problem because I had a broken config in my /etc/portage/env that silently prevented me from running tests on glib :/ The attached patch makes the following changes to fix the issue: * add python-2 as a build-time dependency when USE=test (we cannot use python.eclass because that will make python a run-time dependency, see bug #377549). * sed gdbus-testserver.py and gtester-report to use python2 (can't use python_convert_shebangs since we are not using python.eclass). As far as I can tell, these are the only python scripts that the test suite runs. * hard-disable the /gdbus/connection/life-cycle test (it randomly fails around 1/3 of the time when I try to run it). * bring back the code from 2.28.x ebuilds to disable tests requiring gdbus-testserver.py when dbus-python or pygobject:2 are unavailable (otherwise, there will be circular dependencies when FEATURES=test). In addition, symlink gdbus-testserver.py to /bin/true in this case to prevent an assertion. I have tested a patched 2.30.0 ebuild around a dozen times in different ways, and the tests seem to behave properly now. (In reply to comment #2) > Created attachment 288171 [details, diff] > patch for glib-2.30.0.ebuild to fix tests > > Confirming. I didn't notice the problem because I had a broken config in my > /etc/portage/env that silently prevented me from running tests on glib :/ > > The attached patch makes the following changes to fix the issue: > * add python-2 as a build-time dependency when USE=test (we cannot use > python.eclass because that will make python a run-time dependency, see bug > #377549). Regarding python.eclass making python a RDEPEND, I think it's common to all packages using python, but I would still use it as that DEPEND/RDEPEND would only be added with USE "test". Other option would be to also skip python requiring tests when a "python" USE flag is not set. What do you think? (Will CC python team and Arfrever to let them check this, as I am not sure about not using python.eclass and doing the changes manually) > * sed gdbus-testserver.py and gtester-report to use python2 (can't use > python_convert_shebangs since we are not using python.eclass). As far as I can > tell, these are the only python scripts that the test suite runs. > * hard-disable the /gdbus/connection/life-cycle test (it randomly fails around > 1/3 of the time when I try to run it). Have you reported this to upstream? In that case, please let me know the bug reference to add it as a comment before skipping it in the ebuild. > * bring back the code from 2.28.x ebuilds to disable tests requiring > gdbus-testserver.py when dbus-python or pygobject:2 are unavailable (otherwise, > there will be circular dependencies when FEATURES=test). In addition, symlink > gdbus-testserver.py to /bin/true in this case to prevent an assertion. > Fine :D > I have tested a patched 2.30.0 ebuild around a dozen times in different ways, > and the tests seem to behave properly now. Thanks a lot python.eclass adds dependency on Python only when PYTHON_DEPEND variable is set before inheriting python.eclass. "test" USE flag can enable build-time dependency on Python. (In reply to comment #4) > python.eclass adds dependency on Python only when PYTHON_DEPEND variable is set > before inheriting python.eclass. "test" USE flag can enable build-time > dependency on Python. Great! (In reply to comment #3) > Have you reported this to upstream? In that case, please let me know the bug > reference to add it as a comment before skipping it in the ebuild. No, because I cannot reproduce the test failure when running make check from a tarball in my home directory, so I am not sure whether this is really an upstream bug or something subtle about our src_test(). Maybe there should be run-time dependency on Python due to /usr/bin/gtester-report. install-exec-hook target changes shebang in gtester-report, so calling sed in src_prepare() doesn't have desired effect. (In reply to comment #6) > install-exec-hook target changes shebang in gtester-report, so calling sed in > src_prepare() doesn't have desired effect. You are right, calling sed in src_prepare() has no useful effect in this case. However, for the install-exec-hook to work right, PYTHON needs to be set (or passed to emake install). > Maybe there should be run-time dependency on Python due to > /usr/bin/gtester-report. I don't want to add a hard run-time dependency due to bug #377549. After grepping through gnome sources, it appears that /usr/bin/gtester-report is only used for "make test-report" in a number of libraries (gtk+, cogl, clutter, libpeas, and webkit-gtk). However, it is not used when doing "make check", and so it's not needed as a dependency for building or testing any Gentoo package. The only reason to care about it is to make life convenient for the small number of users who are doing their own software development with glib and who want to generate pretty test report files. This is by contrast with gdbus-codegen, which really is required for building some packages. Probably this situation would be best handled by a USE flag (maybe "utils"?), and adding an ewarn if the USE flag is disabled (and hence /usr/bin/gtester-report is non-functional). And perhaps this USE flag could also, for the sake of convenience, pull in gdbus-codegen. Created attachment 288345 [details, diff]
patch for glib-2.30.0.ebuild to fix tests
Changes relative to the previous patch:
* switch to EAPI3 and inherit python
* add a utils USE flag. It will pull in python and gdbus-codegen as runtime deps.
* "python_set_active_version 2" instead of sedding gdbus-testserver.py
* do not do anything with gtester-report in src_prepare(), we don't run it
* call "emake install" with PYTHON variable set to correctly install /usr/bin/gtester-report
* add an elog if installing glib with USE=-utils and no python2 installed
I suggest: src_install() { ... if ! use utils; then rm "${ED}usr/bin/gtester-report" fi ... } Instead of additional elog message. (In reply to comment #9) > I suggest: [...] > Instead of additional elog message. Sure, that also works. +*glib-2.30.1-r1 (16 Oct 2011) + + 16 Oct 2011; Pacho Ramos <pacho@gentoo.org> +glib-2.30.1-r1.ebuild, + +files/glib-2.30.1-homedir-env.patch, metadata.xml: + Fix python ddependency issues as it's needed in some cases, bug #384853 (by + Alexandre Rostovtsev and Arfrever Frehtes Taifersar Arahesis); depend more + scrictly on dev-util/gdbus-codegen to prevent unwanted mixes (and also help + maintainers to remember both need to be bumped at the same time); utils die + themselves with eapi4 (drop unneeded dies then); handle the G_HOME + environment variable to override the passwd entry, upstream bug #142568; + handle the G_HOME environment variable to override the passwd entry, upstream + bug #142568 (by Debian folks); + workaround-gio-test-failure-without-userpriv.patch looks to be no longer + needed as upstream bug should be fixed; assert-msg-test prefers to have gdb + installed when running test. + |