Source: acpid
Version: 1:2.0.34-1+b1
Usertags: pidof-without-procps

Dear maintainer(s) of acpid,

it appears that acpid uses `pidof` in its testsuite, or that
at least one of its binary packages uses `pidof` at runtime.
Historically, `pidof` was provided by the Essential package
`sysvinit-tools`, making an explicit dependency unnecessary. However
`pidof` will soon be moved to `procps` and will no longer be part of
the Essential set.

Please add an explicit dependency on `procps`:

* via the `Depends:` field of all binary packages of acpid
  that use `pidof` at runtime;
* via the `Build-Depends:` field of acpid, if `pidof` is
  used in tests run at build-time;
* via the `Depends:` field of `debian/control/tests`, if `pidof` is
  used in autopkgtests.

To prevent any disruption for users of acpid, please add
this dependency now, before `pidof` is moved from `sysvinit-utils` to
`procps`. Alternatively, you could remove all uses of `pidof`.

It is believed that acpid uses `pidof` due to the following
code snippets:

```
path: acpid_1:2.0.34-1/debian/powerbtn.sh
if pidof -x $PMS > /dev/null; then
        exit
elif test "$XUSER" != "" && pidof dcopserver > /dev/null && test -x 
/usr/bin/dcop && /usr/bin/dcop --user $XUSER kded kded loadedModules | grep -q 
klaptopdaemon; then
        exit
elif test "$XUSER" != "" && test -x /usr/bin/qdbus; then


path: acpid_1:2.0.34-1/samples/powerbtn/powerbtn.sh.old
# If gnome-power-manager, kpowersave or klaptopdaemon are running...
if pidof gnome-power-manager kpowersave > /dev/null ||
  (pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop kded 
kded loadedModules | grep -q klaptopdaemon) ; then
        # Let them handle the power button.


path: acpid_1:2.0.34-1/samples/powerbtn/powerbtn.sh.old
# If KDE is running...
if ps -Af | grep -q '[k]desktop' && pidof dcopserver > /dev/null && test -x 
/usr/bin/dcop ; then
        # Ask it to logout.
    KDESES=`pidof dcopserver | wc -w`


path: acpid_1:2.0.34-1/samples/powerbtn/powerbtn.sh
# If one of those is running or any of several others,
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) ||
        ( test "$XUSER" != "" && test -x /usr/bin/qdbus && test -r 
/proc/$(pgrep -n kded4)/environ && su - $XUSER -c "eval $(echo -n 'export '; 
cat /proc/$(pgrep -n kded4)/environ |tr '\0' '\n'|grep 
DBUS_SESSION_BUS_ADDRESS); qdbus org.kde.kded" | grep -q powerdevil) ; then
        # Get out as the power manager that is running will take care of things.
```

Feel free to close this issue if this is a false positive (for example
if this code is in an unreachable code path).

Regards,

-- 
Gioele Barabucci

Reply via email to