[SCM] Debian package checker branch, master, updated. 2.4.3-220-g34c8dde
The following commit has been merged in the master branch:
commit 34c8dded9f9b6c3180705dabbf1fa82bad6d2ffa
Author: Niels Thykier <niels@thykier.net>
Date: Mon Feb 7 21:10:06 2011 +0100
Added new tag debhelper-maintscript-need-versioned-build-depends
* Summary of tag changes:
+ Added:
- debhelper-maintscript-need-versioned-build-depends
* checks/debhelper{,.desc}:
+ [NT] Added check for incorrection debhelper version when using the
maintscript feature from debhelper 8.1.0.
diff --git a/checks/debhelper b/checks/debhelper
index 46ec858..2d0354d 100644
--- a/checks/debhelper
+++ b/checks/debhelper
@@ -71,11 +71,17 @@ my $seendhcleank = '';
my $overridetargets = 0;
my %missingbdeps;
-open(RULES, '<', 'debfiles/rules') or fail("cannot read debian/rules: $!");
my $maybe_skipping;
my $dhcompatvalue;
my @versioncheck;
my $inclcdbs = 0;
+
+my $seenmaintscript = 0;
+my $bdepends_noarch;
+my $bdepends;
+
+open(RULES, '<', 'debfiles/rules') or fail("cannot read debian/rules: $!");
+
while (<RULES>) {
if (/^ifn?(?:eq|def)\s/) {
$maybe_skipping++;
@@ -280,42 +286,13 @@ foreach my $file (sort readdir(DEBIAN)) {
}
}
} elsif ($file eq 'control') {
- my $bdepends_noarch = $info->relation_noarch('build-depends-all');
- my $bdepends = $info->relation('build-depends-all');
- if ($needbuilddepends && ! $bdepends->implies('debhelper')) {
- tag 'package-uses-debhelper-but-lacks-build-depends';
- }
- while (my ($dep, $command) = each %missingbdeps) {
- next if $dep eq 'debhelper'; #handled above
- tag 'missing-build-dependency-for-dh_-command', "$command=$dep"
- unless ($bdepends_noarch->implies($dep));
- }
- if (not $bdepends->implies("debhelper (>= $level~)")) {
- tag 'package-lacks-versioned-build-depends-on-debhelper', $level;
- } elsif (@versioncheck or $overridetargets) {
- my %seen;
- @versioncheck = grep { !$seen{$_}++ } @versioncheck;
- for my $program (@versioncheck) {
- my $required = $versions{$program};
- my $needed = "debhelper (>= $required)";
- unless ($bdepends->implies($needed)) {
- tag 'debhelper-script-needs-versioned-build-depends',
- $program, "(>= $required)";
- }
- }
- if ($overridetargets) {
- my $required = '7.0.50~';
- my $needed = "debhelper (>= $required)";
- unless ($bdepends->implies($needed)) {
- tag 'debhelper-overrides-need-versioned-build-depends',
- "(>= $required)";
- }
- }
- }
+ next; # ignore
} elsif ($file =~ m/^ex\.|\.ex$/i) {
tag 'dh-make-template-in-source', "debian/$file";
} elsif ($file =~ m/^(?:.+\.)?debhelper(?:\.log)?$/){
push(@indebfiles, $file);
+ } elsif ($file =~ m/^(?:(.*)\.)?maintscript$/) {
+ $seenmaintscript = 1;
} else {
my $base = $file;
$base =~ s/^[.]+\.//;
@@ -342,6 +319,48 @@ foreach my $file (sort readdir(DEBIAN)) {
}
closedir(DEBIAN);
+$bdepends_noarch = $info->relation_noarch('build-depends-all');
+$bdepends = $info->relation('build-depends-all');
+if ($needbuilddepends && ! $bdepends->implies('debhelper')) {
+ tag 'package-uses-debhelper-but-lacks-build-depends';
+}
+while (my ($dep, $command) = each %missingbdeps) {
+ next if $dep eq 'debhelper'; #handled above
+ tag 'missing-build-dependency-for-dh_-command', "$command=$dep"
+ unless ($bdepends_noarch->implies($dep));
+}
+if (not $bdepends->implies("debhelper (>= $level~)")) {
+ tag 'package-lacks-versioned-build-depends-on-debhelper', $level;
+} elsif (@versioncheck or $overridetargets) {
+ my %seen;
+ @versioncheck = grep { !$seen{$_}++ } @versioncheck;
+ for my $program (@versioncheck) {
+ my $required = $versions{$program};
+ my $needed = "debhelper (>= $required)";
+ unless ($bdepends->implies($needed)) {
+ tag 'debhelper-script-needs-versioned-build-depends',
+ $program, "(>= $required)";
+ }
+ }
+ if ($seenmaintscript) {
+ my $required = '8.1.0~';
+ my $needed = "debhelper (>= $required)";
+ unless ($bdepends->implies($needed)) {
+ tag 'debhelper-maintscript-need-versioned-build-depends',
+ "(>= $required)";
+ }
+ }
+ if ($overridetargets) {
+ my $required = '7.0.50~';
+ my $needed = "debhelper (>= $required)";
+ unless ($bdepends->implies($needed)) {
+ tag 'debhelper-overrides-need-versioned-build-depends',
+ "(>= $required)";
+ }
+ }
+}
+
+
if(scalar(@indebfiles)){
my $f = pop(@indebfiles);
my $others = scalar(@indebfiles);
diff --git a/checks/debhelper.desc b/checks/debhelper.desc
index 4d279b4..876bf42 100644
--- a/checks/debhelper.desc
+++ b/checks/debhelper.desc
@@ -179,6 +179,20 @@ Info: The override targets facility in debhelper, involving debian/rules
assumes a newer version should explicitly declare so for the sake of lenny
backports.
+Tag: debhelper-maintscript-need-versioned-build-depends
+Severity: normal
+Certainty: certain
+Ref: dh(1)
+Info: The mainscript files used by this package was introduced in a later
+ version of debhelper than the package Build-Depends on. The package
+ Build-Depends should be updated to require at least debhelper 8.1.0.
+ Giving the version followed by <tt>~</tt> is recommended so that
+ backports will satisfy the dependency.
+ .
+ squeeze was released with debhelper version 8.0.0, so every package that
+ assumes a newer version should explicitly declare so for the sake of
+ squeeze backports.
+
Tag: brace-expansion-in-debhelper-config-file
Severity: normal
Certainty: possible
diff --git a/checks/files.desc b/checks/files.desc
index 9dd1a0c..e804044 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -1248,3 +1248,6 @@ Info: The package appears to ship a gzip compressed objects.inv file
this file being compressed.
.
This file should be excluded from compression during build time.
+ If using debhelper (<< 8.1.0), you may need to use the -X option to
+ dh_compress. Newer versions of debhelper handles this correctly by
+ default.
diff --git a/debian/changelog b/debian/changelog
index b1035f7..c51536d 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,7 @@ lintian (2.5.0) UNRELEASED; urgency=low
- python-module-in-wrong-location
- missing-dependency-on-python-support
- package-installs-python-bytecode
+ - debhelper-maintscript-need-versioned-build-depends
+ Removed:
- embedded-zlib (now in embedded-library)
- embedded-libpng (now in embedded-library)
@@ -55,6 +56,8 @@ lintian (2.5.0) UNRELEASED; urgency=low
been removed by dh_clean. (Closes: #598251)
+ [NT] Added check for unused build dependency on cdbs. Thanks to
Jari Aalto for suggesting this. (Closes: #582769)
+ + [NT] Added check for incorrection debhelper version when using the
+ maintscript feature from debhelper 8.1.0.
* checks/debian-source-dir:
+ [NT] Added missing import of "Util" perl module. Thanks to David
Bremner for the patch.
diff --git a/t/tests/fields-no-homepage/debian/debian/control.in b/t/tests/debhelper-maintscripts-depends/debian/debian/control.in
similarity index 89%
copy from t/tests/fields-no-homepage/debian/debian/control.in
copy to t/tests/debhelper-maintscripts-depends/debian/debian/control.in
index d63c764..e5e58ed 100644
--- a/t/tests/fields-no-homepage/debian/debian/control.in
+++ b/t/tests/debhelper-maintscripts-depends/debian/debian/control.in
@@ -5,8 +5,8 @@ Maintainer: {$author}
Standards-Version: {$standards_version}
Build-Depends: debhelper (>= 7)
-Package: {$srcpkg}
-Architecture: {$architecture}
+Package: debhelper-maint
+Architecture: all
Depends: $\{misc:Depends\}
Description: {$description}
This is a test package designed to exercise some feature or tag of
diff --git a/t/tests/debhelper-maintscripts-depends/debian/debian/maintscript b/t/tests/debhelper-maintscripts-depends/debian/debian/maintscript
new file mode 100644
index 0000000..f7c669d
--- /dev/null
+++ b/t/tests/debhelper-maintscripts-depends/debian/debian/maintscript
@@ -0,0 +1 @@
+rm_conffile 0.1 debhelper-maint
diff --git a/t/tests/debhelper-maintscripts-depends/desc b/t/tests/debhelper-maintscripts-depends/desc
new file mode 100644
index 0000000..366c83a
--- /dev/null
+++ b/t/tests/debhelper-maintscripts-depends/desc
@@ -0,0 +1,5 @@
+Testname: debhelper-maintscripts-depends
+Sequence: 6000
+Version: 1.0
+Description: Test dependency requirements for debhelper maintscripts
+Test-For: debhelper-maintscript-need-versioned-build-depends
diff --git a/t/tests/debhelper-maintscripts-depends/tags b/t/tests/debhelper-maintscripts-depends/tags
new file mode 100644
index 0000000..f4a427a
--- /dev/null
+++ b/t/tests/debhelper-maintscripts-depends/tags
@@ -0,0 +1 @@
+W: debhelper-maintscripts-depends source: debhelper-maintscript-need-versioned-build-depends (>= 8.1.0~)
--
Debian package checker
Reply to: