[SCM] Debian package checker branch, master, updated. 2.4.1-20-g38da4f5
The following commit has been merged in the master branch:
commit 38da4f59179e74e9655fc0ea67dc9f745c87893b
Author: Raphael Geissert <atomo64@gmail.com>
Date: Sat Jun 26 21:11:07 2010 -0500
Handle variables at the beginning of a call to dpkg-divert
It is safe to strip variables before options on calls to dpkg-divert as
it refuses to do anything if the file to be diverted isn't the last
parameter.
* checks/scripts:
+ [RG] Correctly handle variables at the beginning of a call to
dpkg-divert. Thanks, Andreas Beckmann. (Closes: #586984)
diff --git a/checks/scripts b/checks/scripts
index e82dc31..e86914f 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -948,7 +948,7 @@ while (<SCRIPTS>) {
}
my $mode = /--remove/ ? 'remove' : 'add';
my ($divert) = /dpkg-divert\s*(.*)$/;
- $divert =~ s/\s*--(?:add|quiet|remove|rename|test|local|(:?admindir|divert|package)\s+\S+)\s*//g;
+ $divert =~ s/\s*(?:\${?[\w:=-]+}?)*\s*--(?:add|quiet|remove|rename|test|local|(:?admindir|divert|package)\s+\S+)\s*//g;
# Remove unpaired opening or closing parenthesis
1 while($divert =~ m/\G.*?\(.+?\)/gc);
$divert =~ s/\G(.*?)[()]/$1/;
diff --git a/debian/changelog b/debian/changelog
index cdf82ce..8304891 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -34,6 +34,9 @@ lintian (2.4.2) UNRELEASED; urgency=low
Thanks, Niels Thykier. (Closes: #580700)
* checks/menus:
+ [RG] Recognise call to update-menus when using 'exec.'
+ * checks/scripts:
+ + [RG] Correctly handle variables at the beginning of a call to
+ dpkg-divert. Thanks, Andreas Beckmann. (Closes: #586984)
* collection/objdump-info:
+ [RG] Disable etch compatibility code.
diff --git a/t/tests/scripts-diversions-variables/debian/debian/preinst b/t/tests/scripts-diversions-variables/debian/debian/preinst
index b9ac6c8..c311563 100644
--- a/t/tests/scripts-diversions-variables/debian/debian/preinst
+++ b/t/tests/scripts-diversions-variables/debian/debian/preinst
@@ -28,6 +28,11 @@ if [ install = "$1" ]; then
dpkg-divert --package scripts-diversions --add --rename \
--divert /usr/share/foo/$f.real \
/usr/share/foo/${f#f}
+
+ # This is correct too.
+ dpkg-divert $SOMETHING --package scripts-diversions --add --rename \
+ --divert /usr/share/scripts/t2/foo/some-file.real \
+ /usr/share/scripts/t2/foo/some-file
fi
#DEBHELPER#
--
Debian package checker
Reply to: