Bug 120200 - gnome-base/gnome-applets-2.12.2 does not build battstat applet without apm or acpi
|
Bug#:
120200
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: PPC
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: minor
|
Priority: P3
|
|
Resolution: FIXED
|
Assigned To: ppc@gentoo.org
|
Reported By: schlotzky@gmx.net
|
|
Component: GNOME
|
|
|
URL:
|
|
Summary: gnome-base/gnome-applets-2.12.2 does not build battstat applet without apm or acpi
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2006-01-24 09:57 0000
|
gnome-base/gnome-applets-2.12.2 does not build the battstat applet without the
useflags 'apm' or 'acpi'
On the platform other than ppc (and probably ppc64) this might be right, but on
ppc neither apm nor acpi is needed.
For me the following worked:
--- /usr/portage/gnome-base/gnome-applets/gnome-applets-2.12.2.ebuild
2006-01-23 00:05:43.000000000 +0100
+++ /usr/local/portage/gnome-base/gnome-applets/gnome-applets-2.12.2.ebuild
2006-01-24 16:01:40.000000000 +0100
@@ -53,10 +53,10 @@
--enable-flags \
$(use_enable ipv6)
$(use_with hal)"
-
- if ! use apm && ! use acpi; then
- G2CONF="${G2CONF} --disable-battstat"
- fi
+# we do not need this on ppc
+# if ! use apm && ! use acpi; then
+# G2CONF="${G2CONF} --disable-battstat"
+# fi
}
This just disables the check for the apm and acpi use-flags. Of course this
would be wrong on platforms other than ppc, but I don't know how to determine
the platform in an ebuild.
The same applies to the 2.12.1* ebuilds
flipping assign and cc to ppc folks. can you guys verify this and possibly
provide an ebuild patch?
Please assign back to gnome when done.
Thanks!
As far as I can tell from looking at the source, battstat does not have pmu
specific code. There is an apm emulation option in the kernel, perhaps the
reporter is using this. If so, the apm use flag should be enabled. The other
option is to get the battery info from hal. As far as I know, hal does use the
pmu and can report battery life without the apm layer, so in this case, it
could be enabled without apm and acpi, but would depend on hal.
I guess I should pass this back to the gnome folks, what do you think
considering the above?
(In reply to comment #2)
> As far as I can tell from looking at the source, battstat does not have pmu
> specific code. There is an apm emulation option in the kernel, perhaps the
> reporter is using this. If so, the apm use flag should be enabled. The other
> option is to get the battery info from hal. As far as I know, hal does use the
> pmu and can report battery life without the apm layer, so in this case, it
> could be enabled without apm and acpi, but would depend on hal.
Ok, you're right. Of course I had the apm emulation switched on in the kernel,
but now that I have removed the apm emulation from the kernel battstat still
works.
But if I stop either hald or dbus it dosn't work anymore which suggests a hal
use flag.
gnome team, do you have any further input? Should there be a hal dep?
gnome-applets alreay has a dep on hal, based on the hal use flag.
The point is that on PPC, hal is enough for battery info, apm or acpi isn't
required. Can we add hal to the check?
Sure. Something like this:
Index: gnome-applets-2.12.2.ebuild
===================================================================
RCS file:
/var/cvsroot/gentoo-x86/gnome-base/gnome-applets/gnome-applets-2.12.2.ebuild,v
retrieving revision 1.12
diff -u -p -r1.12 gnome-applets-2.12.2.ebuild
--- gnome-applets-2.12.2.ebuild 3 Feb 2006 19:52:35 -0000 1.12
+++ gnome-applets-2.12.2.ebuild 10 Jul 2006 01:57:18 -0000
@@ -54,7 +54,11 @@ pkg_setup() {
$(use_enable ipv6)
$(use_with hal)"
- if ! use apm && ! use acpi; then
+ if ! use ppc && ! use apm && ! use acpi; then
+ G2CONF="${G2CONF} --disable-battstat"
+ fi
+
+ if use ppc && ! use apm && ! use hal; then
G2CONF="${G2CONF} --disable-battstat"
fi
}
Could someone with a ppc test this?
(In reply to comment #7)
I have tested the patch on ppc and it works very well.
This works for me as well. Please apply it! :)