Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 434810 - Please make sys-power/powertop-2.1-r1 kernel config checks non-fatal
Summary: Please make sys-power/powertop-2.1-r1 kernel config checks non-fatal
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-12 09:03 UTC by Marien Zwart (RETIRED)
Modified: 2012-09-14 14:26 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marien Zwart (RETIRED) gentoo-dev 2012-09-12 09:03:59 UTC
sys-power/powertop-2.1-r1 currently refuses to build for me because I don't have debugfs in the kernel. This is somewhat unnecessary: powertop *builds* just fine on such a kernel, and produces a sensible error message when you try to run it. Please make these checks non-fatal, to prevent unnecessary build failures on systems not yet booted into the right kernel and when building binpkgs. Note the linux-info eclass also recommends this approach: "In general, most checks should be non-fatal. The only time fatal checks should be used is for building kernel modules or cases that a compile will fail without the option."
Comment 1 Manuel Lauss 2012-09-14 06:09:25 UTC
Yes, please also remove the X86_MCE and HDA Powersave checks; powertop builds and
runs on platforms other than newer standard x86 hardware.
Comment 2 Rick Farina (Zero_Chaos) gentoo-dev 2012-09-14 13:37:35 UTC
powertop CANNOT run without X86_MCE, it only produces errors. The purpose of this is to ensure that after you are done building it actually works.  Do I really need to break this out and warn by hand that "although it built it will not work until you fix your kernel options"? Is this really sane? Even my catalyst livecd builds don't have such problems.
Comment 3 Marien Zwart (RETIRED) gentoo-dev 2012-09-14 14:13:54 UTC
There are legitimate reasons to keep a package around that you cannot currently run, the most obvious of which are binpkg building and an initial build from a livecd or similar kernel (chrooted). The linux-info eclass (whose functions you're using for this) recommends you only make the check fatal if you need the config setting enabled at *build* time, which AFAICT isn't the case here. I also asked about this on #gentoo-dev before filing this bug, and got agreement from two or so devs. Finally, powertop produces a quite sensible error message if debugfs support is not present at runtime (I didn't check this for MCE but I suspect it'll behave similarly), so it's not clear to me what failing earlier buys you.

I can go dig through ML archives and similar bugs to find more support for this, but I really am quite certain such checks should only be fatal if they'll cause a *build* time problem, as the downsides of failing early here just don't outweigh the upsides (esp. with powertop failing graciously at runtime if your kernel is deficient).
Comment 4 Rick Farina (Zero_Chaos) gentoo-dev 2012-09-14 14:26:31 UTC
The issue is that while it fails gracefully for missing DEBUG_FS, it horribly crashes on missing X86_MSR (the other fatal check).  Mind you, I am forced to agree that I shouldn't abort the build unless the kernel feature is required to build... sigh. I'll have to find a better way to keep the users for filing invalid bugs. For now I'll make it all warnings. Thanks!


+  14 Sep 2012; Rick Farina <zerochaos@gentoo.org> powertop-2.1-r1.ebuild:
+  make kconfig checks non-fatal to accomodate builders who don't use powertop