lintian: r680 - in trunk: checks debian testset/relations/debian
Author: rra
Date: 2006-06-21 22:31:12 +0200 (Wed, 21 Jun 2006)
New Revision: 680
Modified:
trunk/checks/fields
trunk/debian/changelog
trunk/testset/relations/debian/control
trunk/testset/relations/debian/rules
Log:
+ [RA] Recognize direct invocations of quilt in clean rules and allow
Build-Depends on quilt in that case. Reported by Sam Hocevar.
(Closes: #374878)
+ [RA] Fix handling of versioned Build-Depends to avoid spurious
build-depends-without-arch-dep warnings. Reported by Marcus
Better.
Modified: trunk/checks/fields
===================================================================
--- trunk/checks/fields 2006-06-19 10:50:04 UTC (rev 679)
+++ trunk/checks/fields 2006-06-21 20:31:12 UTC (rev 680)
@@ -82,6 +82,7 @@
[ patch => '^\t\s*(?:perl debian/)?yada\s+unpatch' ],
[ perl => '^\t\s*perl\s' ],
[ $python_depend => '^\t\s*python\s' ],
+ [ quilt => '^\t\s*(\S+=\S+\s+)*quilt\s' ],
[ yada => '^\t\s*yada\s' ],
);
@@ -626,14 +627,28 @@
}
}
}
+
+ # This check is a bit tricky. We want to allow in Build-Depends a
+ # dependency with any version, since reporting this tag over version
+ # mismatches would be confusing and quite likely wrong. The approach
+ # taken is to strip the version information off all dependencies
+ # allowed in Build-Depends, strip the version information off of the
+ # dependencies in Build-Depends, and then allow any dependency in
+ # Build-Depends that's implied by the dependencies we require or allow
+ # there.
if (-e "fields/build-depends" && $arch_dep_packages == 0) {
open(FH, "fields/build-depends") or fail("cannot read fields/build-depends: $!");
my $build_depends = <FH>;
close FH;
my @packages = split /\s*,\s*/, $build_depends;
+ my @allowed = map { s/[\(\[][^\)\]]+[\)\]]//g; $_ } keys (%needed_clean), keys (%allowed_clean);
+ my $dep = Dep::parse (join (',', @allowed));
foreach my $pkg (@packages) {
- my ($name) = ($pkg =~ /^(\S+)/);
- unless (defined $needed_clean{$name} || defined $allowed_clean{$name}) {
+ my $name = $pkg;
+ $name =~ s/[\[\(][^\)\]]+[\)\]]//g;
+ $name =~ s/\s+$//;
+ $name =~ s/\s+/ /g;
+ unless (Dep::implies($dep, Dep::parse ($name))) {
tag "build-depends-without-arch-dep", $name;
}
}
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2006-06-19 10:50:04 UTC (rev 679)
+++ trunk/debian/changelog 2006-06-21 20:31:12 UTC (rev 680)
@@ -10,11 +10,17 @@
Python in Build-Depends, not Build-Depends-Indep, since CDBS wants
to use it in debian/rules clean. Thanks, Jan Lübbe.
+ [HE] Add check for build-deps on build-essential. Yes, people do that.
+ + [RA] Recognize direct invocations of quilt in clean rules and allow
+ Build-Depends on quilt in that case. Reported by Sam Hocevar.
+ (Closes: #374878)
+ + [RA] Fix handling of versioned Build-Depends to avoid spurious
+ build-depends-without-arch-dep warnings. Reported by Marcus
+ Better.
* checks/po-debconf:
+ [RA] Don't consider templates.in to be a stray translated template
file. Thanks, Thomas Huriaux. (Closes: #367534)
- -- Russ Allbery <rra@debian.org> Sat, 3 Jun 2006 09:11:34 -0700
+ -- Russ Allbery <rra@debian.org> Wed, 21 Jun 2006 13:29:37 -0700
lintian (1.23.21) unstable; urgency=low
Modified: trunk/testset/relations/debian/control
===================================================================
--- trunk/testset/relations/debian/control 2006-06-19 10:50:04 UTC (rev 679)
+++ trunk/testset/relations/debian/control 2006-06-21 20:31:12 UTC (rev 680)
@@ -1,7 +1,7 @@
Source: relations
Section: misc
Priority: optional
-Build-Depends: mail-transport-agent, libc6-dev, findutils, foo (>> 2) [!amd64 !i386], bar, arch-test1 [i386], arch-test2 [!i386]
+Build-Depends: mail-transport-agent, libc6-dev, findutils, foo (>> 2) [!amd64 !i386], bar, arch-test1 [i386], arch-test2 [!i386], quilt (>= 0.40)
Build-Depends-Indep: make, bash, debmake, build-essential
Build-Conflicts: foo [amd64 i386], bar [alpha test], xlibs-dev, arch-test1 [powerpc], arch-test2 [!sparc]
Build-Conflicts-Indep: debmake [!powerpc]
Modified: trunk/testset/relations/debian/rules
===================================================================
--- trunk/testset/relations/debian/rules 2006-06-19 10:50:04 UTC (rev 679)
+++ trunk/testset/relations/debian/rules 2006-06-21 20:31:12 UTC (rev 680)
@@ -35,5 +35,6 @@
clean:
rm -rf debian/tmp debian/files
+ TESTING=foo ANOTHER=bar quilt || true
.PHONY: build binary-arch binary-indep binary clean
Reply to: