Your message dated Mon, 15 Nov 2010 13:47:08 +0000
with message-id <[email protected]>
and subject line Bug#593975: fixed in acpi-support 0.137-6
has caused the Debian Bug report #593975,
regarding acpi-support: function CheckPolicy from policy-funcs
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.)
--
593975: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593975
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: acpi-support
Version: 0.137-5
Severity: normal
Execution time and use of resources can be improved by avoiding
unnecessary forks.
It's inefficient for CheckPolicy to 'echo' '0' or '1' instead of
'return'ing them.
With the current implementation, the caller runs the function in a forked
subshell:
if [ `CheckPolicy` = 0 ]; then exit; fi
which costs more than when 'return'ing a status code:
if CheckPolicy; then exit; fi
in the same shell, or even better:
! CheckPolicy || exit 0
IOW:
--- lib/policy-funcs.orig 2010-08-18 23:34:26.000000000 +0200
+++ lib/policy-funcs 2010-08-22 20:54:29.000000000 +0200
@@ -23,9 +23,9 @@
if pidof -x $PMS > /dev/null ||
(test "$XUSER" != "" && pidof dcopserver > /dev/null && test -x
/usr/bin/dcop && /usr/bin/dcop --user $XUSER kded kded loadedModules | grep -q
klaptopdaemon) ||
PowerDevilRunning ; then
- echo 0;
+ return 0
else
- echo 1;
+ return 1
fi
}
And, by the way, newline _is_ a command separator. There's no need for
another one ';'.
'(...)' forks a subshell to execute '...'. It's not needed, IMO, in this
case. This:
--- lib/policy-funcs.a 2010-08-22 20:54:29.000000000 +0200
+++ lib/policy-funcs 2010-08-22 21:07:35.000000000 +0200
@@ -20,9 +20,13 @@
getXconsole
PMS="/usr/bin/gnome-power-manager /usr/bin/kpowersave
/usr/bin/xfce4-power-manager"
PMS="$PMS /usr/bin/guidance-power-manager
/usr/lib/dalston/dalston-power-applet"
- if pidof -x $PMS > /dev/null ||
- (test "$XUSER" != "" && pidof dcopserver > /dev/null && test -x
/usr/bin/dcop && /usr/bin/dcop --user $XUSER kded kded loadedModules | grep -q
klaptopdaemon) ||
- PowerDevilRunning ; then
+ if pidof -x $PMS >/dev/null ||
+ { [ "$XUSER" ] &&
+ pidof dcopserver >/dev/null &&
+ [ -x /usr/bin/dcop ] &&
+ /usr/bin/dcop --user $XUSER kded kded loadedModules |
+ grep -q klaptopdaemon; } ||
+ PowerDevilRunning; then
return 0
else
return 1
will run the tests in the same shell (no subshell forks).
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages acpi-support depends on:
ii acpi-fakekey 0.137-5 tool to generate fake key events
ii acpi-support-base 0.137-5 scripts for handling base ACPI eve
ii acpid 1:2.0.6-1 Advanced Configuration and Power I
ii lsb-base 3.2-23.1 Linux Standard Base 3.2 init scrip
ii pm-utils 1.3.0-2 utilities and scripts for power ma
ii x11-xserver-utils 7.5+2 X server utilities
Versions of packages acpi-support recommends:
ii dbus 1.2.24-3 simple interprocess messaging syst
pn radeontool <none> (no description available)
ii vbetool 1.1-2 run real-mode video BIOS code to a
pn xscreensaver | gnome-screensa <none> (no description available)
Versions of packages acpi-support suggests:
ii rfkill 0.4-1 tool for enabling and disabling wi
ii xinput 1.5.2-1 Runtime configuration and test of
-- no debconf information
Cheers,
--
Cristian
--- End Message ---
--- Begin Message ---
Source: acpi-support
Source-Version: 0.137-6
We believe that the bug you reported is fixed in the latest version of
acpi-support, which is due to be installed in the Debian FTP archive:
acpi-fakekey_0.137-6_amd64.deb
to main/a/acpi-support/acpi-fakekey_0.137-6_amd64.deb
acpi-support-base_0.137-6_all.deb
to main/a/acpi-support/acpi-support-base_0.137-6_all.deb
acpi-support_0.137-6.diff.gz
to main/a/acpi-support/acpi-support_0.137-6.diff.gz
acpi-support_0.137-6.dsc
to main/a/acpi-support/acpi-support_0.137-6.dsc
acpi-support_0.137-6_all.deb
to main/a/acpi-support/acpi-support_0.137-6_all.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.
Michael Meskes <[email protected]> (supplier of updated acpi-support 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: Mon, 15 Nov 2010 14:22:40 +0100
Source: acpi-support
Binary: acpi-support acpi-support-base acpi-fakekey
Architecture: source all amd64
Version: 0.137-6
Distribution: unstable
Urgency: low
Maintainer: Debian Acpi Team <[email protected]>
Changed-By: Michael Meskes <[email protected]>
Description:
acpi-fakekey - tool to generate fake key events
acpi-support - scripts for handling many ACPI events
acpi-support-base - scripts for handling base ACPI events such as the power
button
Closes: 593518 593975 603471
Changes:
acpi-support (0.137-6) unstable; urgency=low
.
* Re-diffed patches to remove fuzz. (Closes: #593518)
* Update key-constants from 2.6.32 kernel in squeeze. (Closes:
#603471)
* Optimized CheckPolicy to save resources. (Closes: #593975)
Checksums-Sha1:
47919e0105f6d27fe0ea51a602526e40db024c01 1234 acpi-support_0.137-6.dsc
e9b483c288a93b3698fda823afe1c5c7fa791de6 58414 acpi-support_0.137-6.diff.gz
f018d8c5b7e1bdd643dff3b5d6064b3322c6321e 50184 acpi-support_0.137-6_all.deb
ff9bef7c07e5966506b0bffc5a2712807e872d31 19122
acpi-support-base_0.137-6_all.deb
908137c90f00606625be8a67592d1637b16e1a0c 21914 acpi-fakekey_0.137-6_amd64.deb
Checksums-Sha256:
10dab7f4711cb9b7ba8464af9f4f0575bf70fe450a5187b0618e6e09b04b49be 1234
acpi-support_0.137-6.dsc
4aab3cade6c1d59000fa2d8a6a61b4a4c8a2f2c40bd2d59cfea8386219aaff0c 58414
acpi-support_0.137-6.diff.gz
2ca6a530022095e640173decebd750c39ce26cfeb0a58899d60c82f50261ee93 50184
acpi-support_0.137-6_all.deb
7390e463ecb7d7b7a10268d5d262d248e5f54ccd6b341320f5c639e123361fc5 19122
acpi-support-base_0.137-6_all.deb
82780d1fd190494f33a48b1e0587af7303426a59674bda2687ed833fa3bbb930 21914
acpi-fakekey_0.137-6_amd64.deb
Files:
b34fc6b951b122e6fa4f8459748ddf62 1234 admin optional acpi-support_0.137-6.dsc
30b7963f8b7097c7cda9fbb7ca68938f 58414 admin optional
acpi-support_0.137-6.diff.gz
804a74d797baf3067c2384e32c9f8632 50184 admin optional
acpi-support_0.137-6_all.deb
edbc75352510701e3ff7bdd364a6f656 19122 admin optional
acpi-support-base_0.137-6_all.deb
1d3b118bf0e255dcbdcb97f014296e91 21914 admin optional
acpi-fakekey_0.137-6_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iD8DBQFM4TY+VkEm8inxm9ERAk21AJ414exJ5XiuKZUgWIKfwrB1yW+3pgCeNLrp
xHNN0vSGkLz7O6k3PldUhi0=
=RJRQ
-----END PGP SIGNATURE-----
--- End Message ---