I’m in the middle of an emerge -e world
I started to try getting as much glibc 2.8 failure have a bug already on Gentoo’s Bugzilla so that users hitting them don’t have to report them anew.
One thing I noticed during this rebuild is the amount of time spent with no good reason to build tests and examples.
I have the test feature disabled, I only enable it for the software I maintain, and I usually don’t have so much time to look at the test of all software. Still some packages, like dbus, hal, gtk, and so on, build their tests anyway. They don’t run them, but they build tests and example during the default make all
call.
I talked with Lennart about that some time ago as also libdaemon does that. He pointed out to me that these examples are often a way for the developers to test that the code still links correctly, for instance, and thus should not be disabled by default during development. I agree it can be useful that way.
For this reason, I prepared a patch for libdaemon, that you can now find here, which I should have committed and I forgot about – I’ll see to do that soonish 😛 – which should make it possible to have the best of both options: developers still get their examples (and/or tests), while distributions can opt-out them.
For ebuilds, this means that the src_test
function should do a make -C tests
or make -C examples
to build tests and examples, after such a patch is applied, to explicitly build the code that most users won’t need during standard run.
I know it’s just seconds, or minutes, of time to build the examples, but if you add all those up, you’re wasting lots of time. And we should always strive to optimise time usage, no?
Update: the conditional-examples patch was a dead link, so I now link directly to Lennart’s gitweb and the diff that he used; remember please that it works for examples, but tests might be slightly different.
Update (2017-04-29): That link is now dead so I removed the example, sorry.