Your message dated Wed, 02 Dec 2009 10:53:19 +0000
with message-id <[email protected]>
and subject line Bug#555905: fixed in powermgmt-base 1.31
has caused the Debian Bug report #555905,
regarding powermgmt-base: patch to prefer sysfs even on non-acpi systems
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
555905: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=555905
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: powermgmt-base
Version: 1.30+nmu1
Severity: minor
Tags: patch
User: [email protected]
Usertags: origin-ubuntu karmic ubuntu-patch
Hi Chris,
In Ubuntu, we've applied the attached patch which does the following:
* on_ac_power: use /sys/class/power_supply if present on *all* systems,
not just acpi systems, as this should be the preferred abstraction on
all platforms. LP: #321219.
This follows up on Joey Hess's last NMU to close bug #473629.
/sys/class/power_supply is not specific to ACPI, so we should check it
regardless of whether ACPI support is detected - if the PMU and APM /proc
interfaces aren't already obsolete too, I guess they will be at some point
down the line, and the "acpi_available" check itself depends on the legacy
/proc/acpi being present.
It's possible that this change will fix bug #514889, but I haven't proven
this to be the case.
Cheers,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
[email protected] [email protected]
diff -Nru powermgmt-base-1.30+nmu1/src/on_ac_power powermgmt-base-1.30+nmu1ubuntu1/src/on_ac_power
--- powermgmt-base-1.30+nmu1/src/on_ac_power 2008-09-01 10:42:08.000000000 -0700
+++ powermgmt-base-1.30+nmu1ubuntu1/src/on_ac_power 2009-11-12 06:10:13.000000000 -0800
@@ -13,41 +13,46 @@
set -e
-# ACPI
+# sysfs
#
# This algorithm is complicated by the possibility of multiple AC
# adapters. We scan the ac_adapter/power_supply directory looking for adapters
# that have known states. If any adapter is on-line, we return 0. If
# no adapters are on-line but one or more are off-line, we return 1.
#
-if /sbin/acpi_available; then
- OFF_LINE_P=no
- if [ -d /sys/class/power_supply/ ]; then
- for FN in /sys/class/power_supply/*; do
- if test -d "${FN}" && test -r "${FN}/type"; then
- type="$(cat ${FN}/type)"
- if test "x${type}" = "xMains"; then
- if [ -r "${FN}/online" ]; then
- online="$(cat ${FN}/online)"
- [ "$online" = 1 ] && exit 0
- [ "$online" = 0 ] && OFF_LINE_P=yes
- fi
+OFF_LINE_P=no
+
+if [ -d /sys/class/power_supply/ ]; then
+ for FN in /sys/class/power_supply/*; do
+ if test -d "${FN}" && test -r "${FN}/type"; then
+ type="$(cat ${FN}/type)"
+ if test "x${type}" = "xMains"; then
+ if [ -r "${FN}/online" ]; then
+ online="$(cat ${FN}/online)"
+ [ "$online" = 1 ] && exit 0
+ [ "$online" = 0 ] && OFF_LINE_P=yes
fi
fi
- done
- elif [ -d /proc/acpi/ac_adapter ]; then
- for FN in /proc/acpi/ac_adapter/*; do
- if [ -d "${FN}" ]; then
- if [ -r "${FN}/state" ]; then
- grep --quiet on-line "${FN}/state" && exit 0
- grep --quiet off-line "${FN}/state" && OFF_LINE_P=yes
- elif [ -r "${FN}/status" ]; then
- grep --quiet on-line "${FN}/status" && exit 0
- grep --quiet off-line "${FN}/status" && OFF_LINE_P=yes
- fi
+ fi
+ done
+ [ "${OFF_LINE_P}" = "yes" ] && exit 1
+fi
+
+# ACPI
+# same algorithm as above, a fallback only when the generic sysfs interface
+# is not available (old kernels only)
+if /sbin/acpi_available && [ -d /proc/acpi/ac_adapter ]; then
+ for FN in /proc/acpi/ac_adapter/*; do
+ if [ -d "${FN}" ]; then
+ if [ -r "${FN}/state" ]; then
+ grep --quiet on-line "${FN}/state" && exit 0
+ grep --quiet off-line "${FN}/state" && OFF_LINE_P=yes
+ elif [ -r "${FN}/status" ]; then
+ grep --quiet on-line "${FN}/status" && exit 0
+ grep --quiet off-line "${FN}/status" && OFF_LINE_P=yes
fi
- done
- fi
+ fi
+ done
[ "${OFF_LINE_P}" = "yes" ] && exit 1
fi
--- End Message ---
--- Begin Message ---
Source: powermgmt-base
Source-Version: 1.31
We believe that the bug you reported is fixed in the latest version of
powermgmt-base, which is due to be installed in the Debian FTP archive:
powermgmt-base_1.31.dsc
to main/p/powermgmt-base/powermgmt-base_1.31.dsc
powermgmt-base_1.31.tar.gz
to main/p/powermgmt-base/powermgmt-base_1.31.tar.gz
powermgmt-base_1.31_i386.deb
to main/p/powermgmt-base/powermgmt-base_1.31_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Chris Hanson <[email protected]> (supplier of updated powermgmt-base package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Wed, 02 Dec 2009 01:33:15 -0800
Source: powermgmt-base
Binary: powermgmt-base
Architecture: source i386
Version: 1.31
Distribution: unstable
Urgency: low
Maintainer: Chris Hanson <[email protected]>
Changed-By: Chris Hanson <[email protected]>
Description:
powermgmt-base - Common utils and configs for power management
Closes: 449049 546879 555905
Changes:
powermgmt-base (1.31) unstable; urgency=low
.
* debian/control: Remove dependency on modutils.
* debian/powermgmt-base.postinst: Don't use /sbin/MAKEDEV.
(closes: Bug#449049)
* on_ac_power: Use /sys/class/power_supply if present on *all* systems,
not just acpi systems, as this should be the preferred abstraction on
all platforms. LP: #321219. (closes: Bug#555905)
* debian/control: Reverse order of udev and makedev.
(closes: Bug#546879)
* debian/control: Bump standards-version (no changes).
* debian/copyright: Update GPL reference to include version.
Checksums-Sha1:
013512c108a0024ebaeb1acfb1f914edee060518 730 powermgmt-base_1.31.dsc
a9e235bf1e28dea1ba9259eb364a8e33c1dfcb7b 10015 powermgmt-base_1.31.tar.gz
98855a06b52ae2947b42fd46602e8ea90b3e6121 11650 powermgmt-base_1.31_i386.deb
Checksums-Sha256:
70b2ecc3aad65826779af33b38cbcd4eb813e63585398374de83924607692ef1 730
powermgmt-base_1.31.dsc
cfa68cbb381f9eeef2c4e4f50abd864e951aaa58f6ca647d8b60360cd1d22024 10015
powermgmt-base_1.31.tar.gz
c548b1642f770d817e9e93e2e63d4931c879465d88fcab16ec12476a96645980 11650
powermgmt-base_1.31_i386.deb
Files:
a3bc2bf9c7d18581ae06ba5b66cca212 730 utils optional powermgmt-base_1.31.dsc
6e57e71d0cd2ef3fbeb7b031c7f24f52 10015 utils optional
powermgmt-base_1.31.tar.gz
868c3d16c12fe5f81b5d5564501d0201 11650 utils optional
powermgmt-base_1.31_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAksWNHIACgkQ46qC2Bs1LAGY4gCfQcxyXCEBm6lh6yWqFwfpAcIS
ojcAnjfc/ZMzpMiSAibRHW56PMkf6pvu
=n5Xz
-----END PGP SIGNATURE-----
--- End Message ---