From 38e0e63a462ada3e516cd00f50d54828ca757a86 Mon Sep 17 00:00:00 2001 From: joeyh Date: Thu, 31 May 2007 17:27:59 +0000 Subject: [PATCH] r2004: file. (Thanks Wakko) * Use dpkg-query to retrieve conffile info in udev rules upgrade code rather than parsing status directly. (Thanks Guillem) --- autoscripts/preinst-udev | 2 +- debian/changelog | 8 +++++--- dh_installudev | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/autoscripts/preinst-udev b/autoscripts/preinst-udev index 9d90a35..2b6ede3 100644 --- a/autoscripts/preinst-udev +++ b/autoscripts/preinst-udev @@ -1,7 +1,7 @@ if [ "$1" = install ] || [ "$1" = upgrade ]; then if [ -e "#OLD#" ]; then if [ "`md5sum \"#OLD#\" | sed -e \"s/ .*//\"`" = \ - "`sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' #OLD#'{s/.* //;p}}\" /var/lib/dpkg/status`" ] + "`dpkg-query -W -f='${Conffiles}' #PACKAGE# | sed -n -e \"\\\\' #OLD#'s/.* //p\"`" ] then rm -f "#OLD#" fi diff --git a/debian/changelog b/debian/changelog index 8a72f9b..a46e355 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,12 +1,14 @@ -debhelper (5.0.50) UNRELEASED; urgency=low +debhelper (5.0.50) unstable; urgency=low * dh_installwm: If a path is not given, assume the file is in usr/bin, since usr/X11R6/bin now points to there. * Update urls to web page. * Add some checks for attempts to act on packages not defined in the control - file. + file. (Thanks Wakko) + * Use dpkg-query to retrieve conffile info in udev rules upgrade code + rather than parsing status directly. (Thanks Guillem) - -- Joey Hess Sun, 27 May 2007 22:27:59 -0400 + -- Joey Hess Thu, 31 May 2007 13:14:06 -0400 debhelper (5.0.49) unstable; urgency=low diff --git a/dh_installudev b/dh_installudev index 768703a..44f3177 100755 --- a/dh_installudev +++ b/dh_installudev @@ -79,7 +79,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { if (! $dh{NOSCRIPTS}) { my $old="/etc/udev/$filename"; my $rule="/etc/udev/rules.d/$dh{PRIORITY}$filename"; - autoscript($package,"preinst","preinst-udev","s!#OLD#!$old!g;s!#RULE#!$rule!g"); + autoscript($package,"preinst","preinst-udev","s!#OLD#!$old!g;s!#RULE#!$rule!g;s!#PACKAGE#!$package!g"); autoscript($package,"postinst","postinst-udev","s!#OLD#!$old!g;s!#RULE#!$rule!g"); } } -- 2.39.5