Bug#340809: lirc: asks whether to create devices, instead of telling

2005-11-25 Thread Steve Langasek
Package: lirc
Version: 0.7.1pre2-2
Severity: normal

Installing lirc results in a prompt asking whether LIRC device nodes should
be created.  This is unnecessary user interaction in a maintainer script,
which is best avoided; Policy 10.6 currently allows calling MAKEDEV after
*notifying* the user, instead of having to ask for the user's approval.
Please convert this debconf prompt into a debconf note, so that it does not
interrupt the installation process.

In addition, it should never be necessary to ask a user Should I create the
device nodes *if they are not there*: you should be able to *check* whether
they are there, and skip the prompt if no device creation is needed...

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.
[EMAIL PROTECTED]   http://www.debian.org/


signature.asc
Description: Digital signature


Bug#340809: lirc: asks whether to create devices, instead of telling

2005-11-25 Thread Steve Langasek
Follow-up:

Since lirc is using major/minor numbers in the Linux local use space, it's
probably not appropriate to actually have /sbin/MAKEDEV support them; which
means that the postinst needs to call mknod directly as it does now.
However, this does the wrong thing on devfs- or udev-using systems.  It
would be a good idea to include the MAKEDEV checks for non-static dev in
the lirc postinst:

if [ -d /dev/.static/dev/ ]  [ wd = /dev ]  [ -e /proc/mounts ] \
 grep -qE '^[^ ]+ /dev/\.static/dev' /proc/mounts; then
  cd /dev/.static/dev/
elif [ -d /.dev/ ]  [ wd = /dev ]  [ -e /proc/mounts ] \
 grep -qE '^[^ ]+ /\.dev' /proc/mounts; then
  cd /.dev/
elif [ -d .udevdb/ ]  [ wd = /dev ]; then
  echo .udevdb presence implies active udev.  Aborting MAKEDEV invocation.
  # use exit 0, not 1, so postinst scripts don't fail on this
  exit 0
fi

#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#

# don't stomp on devfs users
if  [ -c .devfsd ]
then
echo .devfsd presence implies active DevFS.  Aborting MAKEDEV invocation.
# use exit 0, not 1, so postinst scripts don't fail on this
exit 0
fi

Also, lirc is creating not just /dev/lirc, but also two pipes: /dev/lircd
and /dev/lircm.  Even though historically a number of packages have done
this, pipes don't belong in /dev.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


signature.asc
Description: Digital signature