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

[SCM] Debian package checker branch, master, updated. 2.2.18-71-g127267e



The following commit has been merged in the master branch:
commit 127267ed9d19c05457608e13d03f6f3740158ef7
Author: Russ Allbery <rra@debian.org>
Date:   Fri Dec 25 13:02:22 2009 -0800

    Check debian/source/lintian-overrides for source package overrides
    
    * collection/override-file:
      + [RA] Check debian/source/lintian-overrides before
        debian/source.lintian-overrides for source package overrides.
        Thanks, martin f krafft.  (Closes: #554617)
    * doc/lintian.sgml:
      + [RA] Document debian/source/lintian-overrides as the new preferred
        location for source overrides.

diff --git a/collection/override-file b/collection/override-file
index 97e2f20..812fee4 100755
--- a/collection/override-file
+++ b/collection/override-file
@@ -3,17 +3,17 @@
 
 # Copyright (C) 1999 by Darren Benham
 # Derived from debian-readme by Richard Braakman
-# 
+#
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, you can find it on the World Wide
 # Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
@@ -33,20 +33,24 @@ my $type = shift;
 
 unlink("override");
 
-# Pick the first of these files that exists.
-my $file;
+# Pick the first of these files that exists.  Prefer source/lintian-overrides
+# to source.lintian-overrides for source packages.
+my (@overrides, $file);
 if ($type eq 'source') {
-    $file = "unpacked/debian/source.lintian-overrides";
+    @overrides = qw(unpacked/debian/source/lintian-overrides
+                    unpacked/debian/source.lintian-overrides);
 } else {
-    $file = "unpacked/usr/share/lintian/overrides/$pkg";
+    @overrides = ("unpacked/usr/share/lintian/overrides/$pkg");
 }
-
-if ( ! -f $file ) 
-{ 	if ( -f $file . ".gz" ) { $file = $file . ".gz"; }
-	else { $file = ''; }
+for my $override (@overrides) {
+    if (-f $override) {
+        $file = $override;
+    } elsif (-f "$override.gz") {
+        $file = "$override.gz";
+    }
 }
 
-if ( $file eq '' ) {
+if (not defined $file) {
     # no override found
 } elsif ($file =~ /\.gz$/) {
     gunzip_file($file, "override");
@@ -54,3 +58,9 @@ if ( $file eq '' ) {
     link($file, "override")
 	or fail("cannot link $file to override: $!");
 }
+
+# Local Variables:
+# indent-tabs-mode: nil
+# cperl-indent-level: 4
+# End:
+# vim: syntax=perl sw=4 ts=8 et
diff --git a/debian/changelog b/debian/changelog
index 5f24cf6..d19e54d 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -79,6 +79,10 @@ lintian (2.3.0) UNRELEASED; urgency=low
   * collection/ar-info{,.desc}:
     + [RA] Collects the results of ar t on all *.a files, used by the new
       OCaml checks.  Contributed by Stéphane Glondu.
+  * collection/override-file:
+    + [RA] Check debian/source/lintian-overrides before
+      debian/source.lintian-overrides for source package overrides.
+      Thanks, martin f krafft.  (Closes: #554617)
 
   * data/debhelper/*:
     + [ADB] Refresh against unstable.  
@@ -90,6 +94,10 @@ lintian (2.3.0) UNRELEASED; urgency=low
     + [RA] New data files listing tags that may result in an automated
       upload reject.
 
+  * doc/lintian.sgml:
+    + [RA] Document debian/source/lintian-overrides as the new preferred
+      location for source overrides.
+
   * frontend/lintian:
     + [RA] Add options --suppress-tags and --suppress-tags-from-file to
       completely suppress the given tags.
diff --git a/doc/lintian.sgml b/doc/lintian.sgml
index 4460755..fbef649 100644
--- a/doc/lintian.sgml
+++ b/doc/lintian.sgml
@@ -445,12 +445,13 @@ Once it has been decided that an override is needed, you can easily add one by
 supplying an overrides file. If the override is for a binary or udeb
 package, you have to place it at
 <file>/usr/share/lintian/overrides/&lt;package&gt;</file> inside the
-package. If the override is for a source package, you have to place
-it at <file>debian/source.lintian-overrides</file>. With that, Lintian
-will know about this exception and not report the problem again when
-checking your package. (Actually, Lintian will report the problem 
-again, but with type <em>overridden</em>, see above.) Note that
-support for source overrides was added in Lintian version 1.23.0.
+package. If the override is for a source package, you have to place it
+at <file>debian/source/lintian-overrides</file>
+or <file>debian/source.lintian-overrides</file> (the former path is
+preferred). With that, Lintian will know about this exception and not
+report the problem again when checking your package. (Actually, Lintian
+will report the problem again, but with type <em>overridden</em>, see
+above.)
 
 <p>
 

-- 
Debian package checker


Reply to: