summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-09-14 13:31:34 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-09-14 13:31:34 -0400
commitf80b0ff42a05879170a84b2c63e05e5c3742910d (patch)
treeca0ee0e86d0d18bfcd95b7342cb3e4e606c8c00f
parenta71b4095bfbae02ed2a14bc2e883c899fb28300a (diff)
dh_installudev: With --name, install debian/<package>.<name>.udev to rules.d/<priority>-<name>, the same as debian/<name>.udev is installed for the first package. Closes: #546337
-rw-r--r--debian/changelog3
-rwxr-xr-xdh_installudev6
2 files changed, 8 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 4cc76c1..7089105 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,9 @@ debhelper (7.4.2) UNRELEASED; urgency=low
* Reorder dh_pysupport call in dh sequence to come before
dh_installinit, so the generated postinst script registers
python modules before trying to use them. Closes: #546293
+ * dh_installudev: With --name, install debian/<package>.<name>.udev
+ to rules.d/<priority>-<name>, the same as debian/<name>.udev
+ is installed for the first package. Closes: #546337
-- Joey Hess <joeyh@debian.org> Mon, 07 Sep 2009 12:48:39 -0400
diff --git a/dh_installudev b/dh_installudev
index 7193ebd..9bfd662 100755
--- a/dh_installudev
+++ b/dh_installudev
@@ -89,6 +89,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
$filename = "$package.udev";
}
$filename=~s/\.udev$/.rules/;
+ my $oldfilename=$filename;
+ if (defined $dh{NAME}) {
+ $filename="$dh{NAME}.rules";
+ }
if ($rules_file) {
if (! -e "$tmp/lib/udev/rules.d") {
@@ -100,7 +104,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
# Remove old rule from /etc, unless it's modified,
# in which case we rename it to match the new
# file in /lib, so it will override.
- my $old="/etc/udev/rules.d/$old_priority$filename";
+ my $old="/etc/udev/rules.d/$old_priority$oldfilename";
$rule=~s/^\/lib/\/etc/;
autoscript($package,"preinst","preinst-moveconffile","s!#OLD#!$old!g;s!#NEW#!$rule!g;s!#PACKAGE#!$package!g");
autoscript($package,"postinst","postinst-moveconffile","s!#OLD#!$old!g;s!#NEW#!$rule!g");