[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.1-52-gede02db



The following commit has been merged in the master branch:
commit ede02db16ba4f43ff24f9c1f296deb7de5e6df41
Author: Niels Thykier <niels@thykier.net>
Date:   Fri Jul 8 23:55:31 2011 +0200

    Moved doc-pkg-not-arch-all tag to fields
    
    The cruft check was only run for source packages and the tag needs
    to be run on binary packages.  Also added test case for the tag.

diff --git a/checks/cruft b/checks/cruft
index dd35595..1c32a07 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -109,15 +109,6 @@ if ($info->native) {
     }
 }
 
-# Check if this is a documentation package that's not arch: all.  This doesn't
-# really belong here either.
-if (defined $info->field('architecture')) {
-    my $arch = $info->field('architecture');
-    if ($pkg =~ /-docs?$/ && $arch ne 'all') {
-        tag 'documentation-package-not-architecture-independent';
-    }
-}
-
 # Check if the package build-depends on autotools-dev, automake, or libtool.
 my $atdinbd = $info->relation('build-depends-all')->implies($AUTOTOOLS);
 my $ltinbd  = $info->relation('build-depends-all')->implies('libtool');
diff --git a/checks/cruft.desc b/checks/cruft.desc
index c224adb..a8b001f 100644
--- a/checks/cruft.desc
+++ b/checks/cruft.desc
@@ -30,12 +30,6 @@ Info: This package has a native version number (a version number without a
  parent directory fooling <tt>dpkg-source</tt> into thinking it was
  supposed to be a non-native package.
 
-Tag: documentation-package-not-architecture-independent
-Severity: normal
-Certainty: certain
-Info: Documentation packages usually shouldn't carry anything that requires
- recompiling on various architectures, in order to save space on mirrors.
-
 Tag: debian-files-list-in-source
 Severity: important
 Certainty: certain
diff --git a/checks/fields b/checks/fields
index 611eb6c..27c344c 100644
--- a/checks/fields
+++ b/checks/fields
@@ -311,10 +311,14 @@ if (not defined $info->field('architecture')) {
 
 	if ($type eq 'binary') {
 		tag 'too-many-architectures' if (@archs > 1);
-                tag 'aspell-package-not-arch-all'
-                    if ($pkg =~ /^aspell-[a-z]{2}(?:-.*)?$/ && (@archs > 1 || $archs[0] ne 'all'));
+		if (@archs > 0) {
+		    tag 'aspell-package-not-arch-all'
+			if ($pkg =~ /^aspell-[a-z]{2}(?:-.*)?$/ && $archs[0] ne 'all');
+		    if ($pkg =~ /-docs?$/ && $archs[0] ne 'all') {
+			tag 'documentation-package-not-architecture-independent';
+		    }
+		}
 	}
-
 	# Used for later tests.
 	$arch_indep = 1 if (@archs == 1 && $archs[0] eq 'all');
 }
diff --git a/checks/fields.desc b/checks/fields.desc
index 964d0bb..95861f9 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -1029,3 +1029,9 @@ Info: The package appear to be a Java library and depending on one
 Ref: http://packages.qa.debian.org/j/java-common/news/20100405T221415Z.html,
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=227587
 
+Tag: documentation-package-not-architecture-independent
+Severity: normal
+Certainty: certain
+Info: Documentation packages usually shouldn't carry anything that requires
+ recompiling on various architectures, in order to save space on mirrors.
+
diff --git a/debian/changelog b/debian/changelog
index 3350d3e..f431502 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,10 @@ lintian (2.5.2) UNRELEASED; urgency=low
       - calls-suidperl-directly
       - suid-perl-script-but-no-perl-suid-dep
 
+  * checks/{cruft,fields}{,.desc}:
+    + [NT] Relocated doc pkg not arch all tag; it was never
+      triggered since cruft was a source check and the tag
+      could only be triggered for binary packages.
   * checks/binaries:
     + [NT] Added lib/${MULTIARCH_DIR} to the list of paths to
       check for public shared libraries.  Thanks to Sven Joachim
diff --git a/t/COVERAGE b/t/COVERAGE
index c7f1032..6f161e6 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -21,7 +21,6 @@ changes-file file-size-mismatch-in-changes-file
 control-files not-allowed-control-file
 control-files unknown-control-file
 
-cruft documentation-package-not-architecture-independent
 cruft source-contains-prebuilt-windows-binary
 
 deb-format tar-errors-from-data
diff --git a/t/tests/files-python-modules/debian/debian/control.in b/t/tests/fields-doc-pkg-wrong-arch/debian/debian/control.in
similarity index 88%
copy from t/tests/files-python-modules/debian/debian/control.in
copy to t/tests/fields-doc-pkg-wrong-arch/debian/debian/control.in
index 1b72861..2639de4 100644
--- a/t/tests/files-python-modules/debian/debian/control.in
+++ b/t/tests/fields-doc-pkg-wrong-arch/debian/debian/control.in
@@ -1,12 +1,12 @@
 Source: {$srcpkg}
 Priority: extra
-Section: python
+Section: doc
 Maintainer: {$author}
 Standards-Version: {$standards_version}
 Build-Depends: debhelper (>= 7.0.50~)
 
-Package: python-foo
-Architecture: all
+Package: {$srcpkg}-doc
+Architecture: any
 Depends: $\{misc:Depends\},
 Description: {$description}
  This is a test package designed to exercise some feature or tag of
diff --git a/t/tests/fields-doc-pkg-wrong-arch/desc b/t/tests/fields-doc-pkg-wrong-arch/desc
new file mode 100644
index 0000000..d7e9f18
--- /dev/null
+++ b/t/tests/fields-doc-pkg-wrong-arch/desc
@@ -0,0 +1,6 @@
+Testname: fields-doc-pkg-wrong-arch
+Sequence: 6000
+Version: 1.0
+Type: native
+Description: Check for doc pkg not being arch all
+Test-For: documentation-package-not-architecture-independent
diff --git a/t/tests/fields-doc-pkg-wrong-arch/tags b/t/tests/fields-doc-pkg-wrong-arch/tags
new file mode 100644
index 0000000..6e227d5
--- /dev/null
+++ b/t/tests/fields-doc-pkg-wrong-arch/tags
@@ -0,0 +1 @@
+W: fields-doc-pkg-wrong-arch-doc: documentation-package-not-architecture-independent

-- 
Debian package checker


Reply to: