tags 644329 + patch
thanks
On Tue, Oct 04, 2011 at 11:50:59PM +0200, [email protected] wrote:
> During an automated test your package tpb was flagged to reference
> files/directories matching /dev/.udev A log of this test can be found
> at [2].
>
> In most cases checking for /dev/.udev is used to determine if udev is
> active. This check no longer works with udev using /run/udev now.
Hi Steve,
I've attached a patch for extending the additional checks with checks
for /run/udev. You were also only checking for /dev/.udev.tdb, and
not /dev/.udevdb or /dev/.udev, so it's likely that it wasn't working
with existing versions of udev (which AFAICT no longer created the
.tdb file) in any case.
I've left in the devfsd check, but it could be removed at this point,
I think.
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
diff -urN tpb-0.6.4.orig/debian/tpb.config tpb-0.6.4/debian/tpb.config
--- tpb-0.6.4.orig/debian/tpb.config 2012-01-19 11:56:01.077088401 +0000
+++ tpb-0.6.4/debian/tpb.config 2012-01-19 12:08:15.334781868 +0000
@@ -25,11 +25,11 @@
fi
fi
-if ! [ -e /dev/.devfsd ] && ! [ -e /dev/.udev.tdb ] && [ "$(stat -c %G /dev/nvram 2>/dev/null)" = thinkpad ]; then # still the old group
+if ! [ -e /dev/.devfsd ] && ! [ -e /run/udev ] && ! [ -e /dev/.udev ] && ! [ -e /dev/.udevdb ] && ! [ -e /dev/.udev.tdb ] && [ "$(stat -c %G /dev/nvram 2>/dev/null)" = thinkpad ]; then # still the old group
db_input high $PACKAGE/groupchanged || true
fi
-if ! [ -e /dev/.devfsd ] && ! [ -e /dev/.udev.tdb ]; then # devfs and udev not enabled
+if ! [ -e /dev/.devfsd ] && ! [ -e /run/udev ] && ! [ -e /dev/.udev ] && ! [ -e /dev/.udevdb ] && ! [ -e /dev/.udev.tdb ]; then # devfs and udev not enabled
if ! [ -e /dev/nvram ] || ! [ "$(stat -c %G /dev/nvram)" = nvram ] || ! [ "$(stat -c %a /dev/nvram 2>/dev/null | cut -b1-2)" = "66" ]; then
db_input medium $PACKAGE/makedev || true
db_go || true
diff -urN tpb-0.6.4.orig/debian/tpb.config~ tpb-0.6.4/debian/tpb.config~
--- tpb-0.6.4.orig/debian/tpb.config~ 1970-01-01 01:00:00.000000000 +0100
+++ tpb-0.6.4/debian/tpb.config~ 2004-08-22 22:25:06.000000000 +0100
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+PACKAGE="tpb"
+CONFIG="/etc/default/$PACKAGE"
+CONFIG_OLD="/etc/X11/Xsession.d/90tpb"
+
+set -e
+. /usr/share/debconf/confmodule
+
+# load data from old configuration file into debconf
+if [ -f $CONFIG_OLD ]; then
+ . $CONFIG_OLD
+
+ if ! [ -z $START_TPB ]; then
+ db_set $PACKAGE/autostart $START_TPB
+ fi
+fi
+
+# override with data from new configuration
+if [ -f $CONFIG ]; then
+ . $CONFIG
+
+ if ! [ -z $START_TPB ]; then
+ db_set $PACKAGE/autostart $START_TPB
+ fi
+fi
+
+if ! [ -e /dev/.devfsd ] && ! [ -e /dev/.udev.tdb ] && [ "$(stat -c %G /dev/nvram 2>/dev/null)" = thinkpad ]; then # still the old group
+ db_input high $PACKAGE/groupchanged || true
+fi
+
+if ! [ -e /dev/.devfsd ] && ! [ -e /dev/.udev.tdb ]; then # devfs and udev not enabled
+ if ! [ -e /dev/nvram ] || ! [ "$(stat -c %G /dev/nvram)" = nvram ] || ! [ "$(stat -c %a /dev/nvram 2>/dev/null | cut -b1-2)" = "66" ]; then
+ db_input medium $PACKAGE/makedev || true
+ db_go || true
+ fi
+fi
+
+db_input low $PACKAGE/autostart || true
+db_go || true
+
+db_stop