Your message dated Thu, 3 Jan 2013 13:47:25 +0100
with message-id <[email protected]>
and subject line Re: [Pkg-acpi-devel] Bug#697246: acpi-support-base: 
powerbtn-acpi-support.sh checks incorrect file for backwards compatibility
has caused the Debian Bug report #697246,
regarding acpi-support-base: powerbtn-acpi-support.sh checks incorrect file for 
backwards compatibility
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.)


-- 
697246: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=697246
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: acpi-support-base
Version: 0.141-2
Severity: normal
Tags: patch

Dear Maintainer,

The powerbtn-acpi-support.sh script in the acpi-support-base package
will look for previous configuration scripts. Namely, it looks for
powerbtn.sh and powerbtn.sh.dpkg-back. However, it does not check for
power.sh. As I understand it, this script has not been used in a long
time, but it is still present on some systems, while powerbtn.sh is not.

Normally this is not an issue, but it does sometimes cause problems such
as bug #694775. While power.sh calls CheckUPowerPolicy,
powerbtn-acpi-support.sh does not. As a result, upowerd may be running,
and certain desktop environments (such as MATE), may be expecting to
receive power events, but they will get them too late. By the time
upowerd sends the event, acpid will already be shutting the system down.

I am attaching a proposed patch. It adds CheckUPowerPolicy to
powerbtn-acpi-support.sh and also checks for the existence of power.sh.

-Yury


-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (990, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages acpi-support-base depends on:
ii  acpid  1:2.0.17-2

acpi-support-base recommends no packages.

Versions of packages acpi-support-base suggests:
ii  acpi-support  0.141-2
ii  consolekit    0.4.5-3.1

-- no debconf information
--- a/powerbtn-acpi-support.sh	2013-01-02 19:25:40.739291024 -0500
+++ b/powerbtn-acpi-support.sh	2013-01-02 19:35:50.942314991 -0500
@@ -15,7 +15,7 @@
 
 . /usr/share/acpi-support/policy-funcs
 
-if CheckPolicy; then
+if { CheckPolicy || CheckUPowerPolicy; }; then
 	exit 0
 fi
 
@@ -26,6 +26,9 @@
         # Compatibility with old config script from acpid package
 	# which is still around because it was changed by the admin
         /etc/acpi/powerbtn.sh.dpkg-bak
+elif [ -x /etc/acpi/power.sh ] ; then
+        # Compatibility with another(?) old config script
+        /etc/acpi/power.sh
 else
 	# Normal handling.
 	/sbin/shutdown -h -P now "Power button pressed"

--- End Message ---
--- Begin Message ---
On Wed, Jan 02, 2013 at 07:41:22PM -0500, Yury Arkady Sobolev wrote:
> The powerbtn-acpi-support.sh script in the acpi-support-base package
> will look for previous configuration scripts. Namely, it looks for
> powerbtn.sh and powerbtn.sh.dpkg-back. However, it does not check for
> power.sh. As I understand it, this script has not been used in a long
> time, but it is still present on some systems, while powerbtn.sh is not.

No, your understanding is not correct. power.sh is something completeley
different. Just look into the script, which btw is still present in current
packages. powerbtn is about the power button press while power.sh is about
powersave.

> Normally this is not an issue, but it does sometimes cause problems such
> as bug #694775. While power.sh calls CheckUPowerPolicy,
> powerbtn-acpi-support.sh does not. As a result, upowerd may be running,
> and certain desktop environments (such as MATE), may be expecting to
> receive power events, but they will get them too late. By the time
> upowerd sends the event, acpid will already be shutting the system down.

Well that bug report ralks about mate-power-manager or something like that to
be added to CheckPolicy, but I couldn't find a trace of this in Debian at all.
So how does this relate to upowerd?

Michael

-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at gmail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL

--- End Message ---

Reply via email to