[SCM] Debian package checker branch, master, updated. 2.2.13-54-g473ec52
The following commit has been merged in the master branch:
commit fded8cf342547931295567aad909fc3bcaf4293d
Author: Russ Allbery <rra@debian.org>
Date: Sat Aug 15 20:30:07 2009 -0700
Don't warn about recently deprecated debhelper commands if optional
* checks/debhelper{,.desc}:
+ [RA] Don't warn about recently deprecated debhelper commands in
possibly optional portions of debian/rules. (Closes: #537607)
diff --git a/checks/debhelper b/checks/debhelper
index fc6b33c..47c1e15 100644
--- a/checks/debhelper
+++ b/checks/debhelper
@@ -73,11 +73,19 @@ my $overridetargets = 0;
my %missingbdeps;
open(RULES, '<', "debfiles/rules") or fail("cannot read debian/rules: $!");
+my $maybe_skipping;
my $dhcompatvalue;
my @versioncheck;
while (<RULES>) {
+ if (/^ifn?(eq|def)\s/) {
+ $maybe_skipping++;
+ } elsif (/^endif\s/) {
+ $maybe_skipping--;
+ }
+
if (m/^\s+-?(dh_\w+)/) {
my $dhcommand = $1;
+
if ($dhcommand =~ /dh_testversion(?:\s+([^\s]+))?/) {
$level = $1 if ($1);
tag "dh_testversion-is-deprecated", "line $.";
@@ -88,15 +96,21 @@ while (<RULES>) {
if ($dhcommand eq 'dh_suidregister') {
tag "dh_suidregister-is-obsolete", "line $.";
}
- if ($dhcommand eq 'dh_desktop') {
- tag 'dh_desktop-is-deprecated', "line $.";
- }
- if ($dhcommand eq 'dh_scrollkeeper') {
- tag 'dh_scrollkeeper-is-deprecated', "line $.";
- }
- if ($dhcommand eq 'dh_clean' and m/\s+\-k(\s+.*)?$/) {
- $seendhcleank = 1;
+
+ # Don't warn about recently deprecated commands in code that may be
+ # optional. It may be there only for backports.
+ unless ($maybe_skipping) {
+ if ($dhcommand eq 'dh_desktop') {
+ tag 'dh_desktop-is-deprecated', "line $.";
+ }
+ if ($dhcommand eq 'dh_scrollkeeper') {
+ tag 'dh_scrollkeeper-is-deprecated', "line $.";
+ }
+ if ($dhcommand eq 'dh_clean' and m/\s+\-k(\s+.*)?$/) {
+ $seendhcleank = 1;
+ }
}
+
# if command is passed -n, it does not modify the scripts
if ($maint_commands->known($dhcommand) and not m/\s+\-n\s+/) {
$needtomodifyscripts = 1;
diff --git a/debian/changelog b/debian/changelog
index 13b5095..03b6772 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,6 +22,8 @@ lintian (2.2.14) UNRELEASED; urgency=low
* checks/debhelper{,.desc}:
+ [CW] Check for the use of debhelper override targets, which require
debhelper 7.0.50.
+ + [RA] Don't warn about recently deprecated debhelper commands in
+ possibly optional portions of debian/rules. (Closes: #537607)
* checks/description:
+ [RA] Decode descriptions from UTF-8 before checking length. Thanks,
Charles Plessy. (Closes: #537207)
diff --git a/t/tests/debhelper-deprecated/debian/debian/rules b/t/tests/debhelper-deprecated/debian/debian/rules
index 7771722..1a51ee8 100755
--- a/t/tests/debhelper-deprecated/debian/debian/rules
+++ b/t/tests/debhelper-deprecated/debian/debian/rules
@@ -22,6 +22,13 @@ binary-indep:
dh_desktop
-dh_dhelp
dh_scrollkeeper
+# Check not warning about deprecated commands in optional portions, but
+# commands that have been toast for a long time are still warned about.
+ifneq "$(LENNY_BACKPORT)" "y"
+ -dh_help
+ dh_scrollkeeper
+ dh_testversion 7
+endif
dh_link
dh_compress
dh_fixperms
diff --git a/t/tests/debhelper-deprecated/tags b/t/tests/debhelper-deprecated/tags
index 44a3627..bba13b7 100644
--- a/t/tests/debhelper-deprecated/tags
+++ b/t/tests/debhelper-deprecated/tags
@@ -1,5 +1,6 @@
W: debhelper-deprecated source: dh_desktop-is-deprecated line 22
W: debhelper-deprecated source: dh_dhelp-is-deprecated line 23
W: debhelper-deprecated source: dh_scrollkeeper-is-deprecated line 24
-W: debhelper-deprecated source: dh_suidregister-is-obsolete line 28
+W: debhelper-deprecated source: dh_suidregister-is-obsolete line 35
W: debhelper-deprecated source: dh_testversion-is-deprecated line 17
+W: debhelper-deprecated source: dh_testversion-is-deprecated line 30
--
Debian package checker
Reply to: