Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 120200 - gnome-base/gnome-applets-2.12.2 does not build battstat applet without apm or acpi
Summary: gnome-base/gnome-applets-2.12.2 does not build battstat applet without apm or...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: PPC Linux
: Normal minor (vote)
Assignee: PPC Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-24 09:57 UTC by Jan Scholz
Modified: 2006-08-20 20:01 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 Jan Scholz 2006-01-24 09:57:30 UTC
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
Comment 1 John N. Laliberte (RETIRED) gentoo-dev 2006-01-24 15:18:41 UTC
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!
Comment 2 Joe Jezak (RETIRED) gentoo-dev 2006-01-25 14:03:08 UTC
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?
Comment 3 Jan Scholz 2006-01-26 05:12:35 UTC
(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.
Comment 4 Joe Jezak (RETIRED) gentoo-dev 2006-05-25 17:22:05 UTC
gnome team, do you have any further input?  Should there be a hal dep?
Comment 5 Daniel Gryniewicz (RETIRED) gentoo-dev 2006-05-25 20:01:06 UTC
gnome-applets alreay has a dep on hal, based on the hal use flag.
Comment 6 Joe Jezak (RETIRED) gentoo-dev 2006-07-08 17:09:55 UTC
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?
Comment 7 Daniel Gryniewicz (RETIRED) gentoo-dev 2006-07-09 18:58:03 UTC
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?
Comment 8 Jan Scholz 2006-07-10 04:08:01 UTC
(In reply to comment #7)
I have tested the patch on ppc and it works very well.
Comment 9 Joe Jezak (RETIRED) gentoo-dev 2006-08-20 08:05:51 UTC
This works for me as well. Please apply it! :)
Comment 10 Daniel Gryniewicz (RETIRED) gentoo-dev 2006-08-20 20:01:22 UTC
applied.