Summary: | virtualx.eclass: virtualmake runs VIRTUALX_COMMAND with nonfatal | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michael Palimaka (kensington) <kensington> |
Component: | Eclasses | Assignee: | Gentoo X packagers <x11> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jlec, mgorny, qt |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 551152 |
Description
Michael Palimaka (kensington)
2014-07-24 13:20:17 UTC
virtualmake runs VIRTUALX_COMMAND with nonfatal (depending on the EAPI), thus the failing 'emake check' doesn't die but just prints the warning, and qt5_foreach_target_subdir keeps going. At the end, the last executed command will be a popd which will succeed and return 0 to virtualmake, which in turn will think everything's fine and won't die. Maybe virtualx.eclass should use EBUILD_DEATH_HOOKS instead of nonfatal? CC'ing eclass maintainers for their opinion. In the meantime I've committed a (temporary?) workaround (also incomplete since it ignores mkdir and pushd/popd failures) https://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commitdiff;h=dc15981d63addb5cf8e7c942fec6590f018a32f8 @kensington: please let me know if it works for you, i.e. if it dies. Thanks, the package I was working with dies correctly now. I'm reassigning to x11@ then, in case they want to consider moving away from nonfatal (I hope so). I suggest to at least improve virtualmake documentation, mentioning this behavior. I see it correctly then the problem here is starting virt X starting tests foreach test test run when the test now fails, the whole testsuite wouldn't stop as we are running everything with nonfatal, right? The reason for this is cleaning up the Xfvb session after the test run. If the tests would die normally the build process would be killed before we can clean up the Xfvb process. That why we run nonfatal and record the return code. You need to handle and pass the return code yourself up the the eclass function. Let's keep this short. We need to clean up, ergo we need to be nonfatal. Which means: 1. You can't call 'die' except for EAPI 6 'die -n'. 2. Every potentially fatal command needs '|| return' since 'die' won't terminate it. Hope this short reminder of ebuild 1-2-3 helps. (In reply to Justin Lecher from comment #5) > I see it correctly then the problem here is > > starting virt X > starting tests > foreach test > test run > > when the test now fails, the whole testsuite wouldn't stop as we are running > everything with nonfatal, right? Yes that's correct AFAIR. > The reason for this is cleaning up the Xfvb session after the test run. If > the tests would die normally the build process would be killed before we can > clean up the Xfvb process. That why we run nonfatal and record the return > code. You need to handle and pass the return code yourself up the the eclass > function. I thought as much. Can you use EBUILD_DEATH_HOOKS instead of nonfatal? or is that non-standard? (In reply to Michał Górny from comment #6) > Let's keep this short. [...] > Hope this short reminder of ebuild 1-2-3 helps. It does not. As I said in comment #4, this peculiar behavior of virtualx.eclass must be documented, I'm sure it's unexpected to most ebuild writers. Or are you suggesting that we should append "|| return" to every die? As there is no way around calling the funxiton with nonfatal, I added a verbose explaination about the rational. commit b016e3fcd2efdb8c70d6ee8d53f63f729d5ba916 Author: Justin Lecher <jlec@gentoo.org> Date: Mon Dec 7 13:31:32 2015 +0100 virtualx.eclass: Add verbose warning about nonfatal call Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=517976 Signed-off-by: Justin Lecher <jlec@gentoo.org> https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b016e3fcd2efdb8c70d6ee8d53f63f729d5ba916 |