lintian: r141 - in trunk: checks debian testset
Author: he
Date: 2004-04-10 12:35:40 +0200 (Sat, 10 Apr 2004)
New Revision: 141
Modified:
trunk/checks/fields
trunk/checks/fields.desc
trunk/debian/changelog
trunk/testset/info_tags.relations
trunk/testset/tags.relations
Log:
* checks/fields:
+ [HE] Reintroduce build-depends-without-arch-dep check with the patch
i proposed in #214231. (Closes: #242484)
Modified: trunk/checks/fields
===================================================================
--- trunk/checks/fields 2004-04-10 01:17:50 UTC (rev 140)
+++ trunk/checks/fields 2004-04-10 10:35:40 UTC (rev 141)
@@ -356,10 +356,48 @@
#Get number of arch-indep packages:
my $arch_indep_packages = 0;
- if (open(CONTROL, "debfiles/control")) {
- $arch_indep_packages = grep { /^Architecture: all/ } <CONTROL>;
+ my $arch_dep_packages = 0;
+ if (not open(CONTROL, "debfiles/control")) {
+ fail("Can't open debfiles/control: $!");
+ } else {
+ local $/ = "\n"; #Read this linewise
+ while (<CONTROL>) {
+ if (/^Architecture: all/) {
+ $arch_indep_packages++;
+ } elsif (/^Architecture:/) {
+ $arch_dep_packages++;
+ }
+ }
}
+ if (-e "fields/build-depends" && $arch_dep_packages == 0) {
+ if (not open(BD, "fields/build-depends")) {
+ fail("Can't open fields/build-depends");
+ } else {
+ my $build_depends = <BD>;
+ close BD;
+
+ my $uses_dh = 0;
+ if (not open (RULES, "debfiles/rules")) {
+ fail("cannot read debfiles/rules: $!");
+ } else {
+ my $target = "none";
+ local $/ = "\n"; #Read this linewise
+ while (<RULES>) {
+ $target = $1 if (/^(\S+):/);
+ if (/^\s+dh_.+/ && grep ($_ eq $target, qw(clean binary-arch build-arch))) {
+ $uses_dh = "yes";
+ last
+ }
+ }
+ close RULES;
+ }
+ unless ($build_depends =~ /^\s*debhelper(?:\s+\((.+?)\))?(?:\s+(\[.+?\]))?\s*$/ && $uses_dh){
+ print "E: $pkg $type: build-depends-without-arch-dep\n"
+ }
+ }
+ }
+
print "E: $pkg $type: build-depends-indep-without-arch-indep\n"
if (-e "fields/build-depends-indep" && $arch_indep_packages == 0);
Modified: trunk/checks/fields.desc
===================================================================
--- trunk/checks/fields.desc 2004-04-10 01:17:50 UTC (rev 140)
+++ trunk/checks/fields.desc 2004-04-10 10:35:40 UTC (rev 141)
@@ -4,6 +4,7 @@
Standards-Version: 3.6.1
Type: binary, udeb, source
Unpack-Level: 1
+Needs-Info: debfiles
Info: This script checks the syntax of the fields in package control files,
as described in the Policy Manual.
@@ -361,6 +362,16 @@
Info: The control file specifies source relations for architecture-independent
packages, but no architecture-independent packages are built.
+Tag: build-depends-without-arch-dep
+Type: error
+Ref: policy 7.6
+Info: The control file specifies source relations for architecture-dependent
+ packages, but no architecture-dependent packages are built. There are some
+ exceptions, the most common is a Build-Depends: debhelper if you use
+ dh_clean in the clean target of debian/rules.
+ In other cases, you most likely need to change Build-Depends to
+ Build-Depends-Indep.
+
Tag: package-has-a-duplicate-relation
Type: error
Info: The package seems to declare a relation on another package which is
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2004-04-10 01:17:50 UTC (rev 140)
+++ trunk/debian/changelog 2004-04-10 10:35:40 UTC (rev 141)
@@ -33,6 +33,8 @@
(Closes: #234978, #235356)
+ [HE] Add check for an Origin field with "Debian" as value.
(Closes: #119618)
+ + [HE] Reintroduce build-depends-without-arch-dep check with the patch
+ i proposed in #214231. (Closes: #242484)
* checks/files:
+ [HE] New check for compiled python files (*.pyc). Patch by David
Kimdon <david@kimdon.org>, thanks. (Closes: #236606)
Modified: trunk/testset/info_tags.relations
===================================================================
--- trunk/testset/info_tags.relations 2004-04-10 01:17:50 UTC (rev 140)
+++ trunk/testset/info_tags.relations 2004-04-10 10:35:40 UTC (rev 141)
@@ -9,6 +9,16 @@
N: Standards-Version control field. However, please remember to update
N: this field next time you upload the package.
N:
+E: relations source: build-depends-without-arch-dep
+N:
+N: The control file specifies source relations for architecture-dependent
+N: packages, but no architecture-dependent packages are built. There are
+N: some exceptions, the most common is a Build-Depends: debhelper if you
+N: use dh_clean in the clean target of debian/rules. In other cases, you
+N: most likely need to change Build-Depends to Build-Depends-Indep.
+N:
+N: Refer to Policy Manual, section 7.6 for details.
+N:
E: relations source: bad-relation build-depends: foo (>> 2) bar baz bat
N:
N: The package declares a relationship that could not be parsed according
Modified: trunk/testset/tags.relations
===================================================================
--- trunk/testset/tags.relations 2004-04-10 01:17:50 UTC (rev 140)
+++ trunk/testset/tags.relations 2004-04-10 10:35:40 UTC (rev 141)
@@ -1,4 +1,5 @@
W: relations source: ancient-standards-version 3.1.1
+E: relations source: build-depends-without-arch-dep
E: relations source: bad-relation build-depends: foo (>> 2) bar baz bat
W: relations source: redundant-origin-field
E: relations-multiple-libs: no-copyright-file
Reply to: