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

[SCM] Debian package checker branch, master, updated. 2.4.3-129-g624b734



The following commit has been merged in the master branch:
commit 624b7347cf7346341ced60fc016ecdfa2424aa7e
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Jan 16 20:44:43 2011 +0100

    Added check for templates left by dh_make in d/watch
    
      * Summary of tag changes:
        + Added:
         - debian-watch-contains-dh_make-template
    
      * checks/watch-file{,.desc}:
        + [NT] Added check for dh_make(1) templates in the watch file.
        Thanks to Nelson A. de Oliveira for the report.  (Closes: #600866)

diff --git a/checks/watch-file b/checks/watch-file
index aa11b7a..338c7ff 100644
--- a/checks/watch-file
+++ b/checks/watch-file
@@ -32,6 +32,8 @@ my $pkg = shift;
 my $type = shift;
 my $info = shift;
 
+my $template = 0;
+
 if (! -f "debfiles/watch") {
     tag 'debian-watch-file-is-missing' unless ($info->native);
     return;
@@ -58,6 +60,7 @@ open(WATCH, '<', 'debfiles/watch') or fail("cannot open watch file: $!");
 local $_;
 my ($watchver, %dversions);
 while (<WATCH>) {
+    $template = 1 if m/^\s*\#\s*Example watch control file for uscan/io;
     next if /^\s*\#/;
     next if /^\s*$/;
     s/^\s*//;
@@ -142,6 +145,8 @@ while (<WATCH>) {
 }
 close WATCH;
 
+tag "debian-watch-contains-dh_make-template" if ($template);
+
 my $changes = $info->changelog;
 if (defined $changes and %dversions) {
     my $data = $changes->data;
diff --git a/checks/watch-file.desc b/checks/watch-file.desc
index 5f8b607..3b905d6 100644
--- a/checks/watch-file.desc
+++ b/checks/watch-file.desc
@@ -136,3 +136,10 @@ Info: The watch file specifies an upstream version number which matches
  incorrect and probably should be replaced with the current expected
  upstream version.  Otherwise, DEHS and similar projects will think the
  package is out of date even when it may not be.
+
+Tag: debian-watch-contains-dh_make-template
+Severity: wishlist
+Certainty: certain
+Info: The watch file contains a standard template included by dh_make.
+ Please remove them once you have implemented the watch file.
+
diff --git a/debian/changelog b/debian/changelog
index 760bd58..cf72178 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,7 @@ lintian (2.4.4) UNRELEASED; urgency=low
       - compressed-objects.inv
       - unused-build-dependency-on-cdbs
       - python-debug-in-wrong-location
+      - debian-watch-contains-dh_make-template
 
   * checks/*:
     + [NT] Use the new pre-sorted file {index,info} when iterating over files.
@@ -81,6 +82,9 @@ lintian (2.4.4) UNRELEASED; urgency=low
       (Closes: #582767)
   * checks/standards-version:
     + [RG] Correctly handle cases where debian/changelog is a symlink.
+  * checks/watch-file{,.desc}:
+    + [NT] Added check for dh_make(1) templates in the watch file.
+    Thanks to Nelson A. de Oliveira for the report.  (Closes: #600866)
 
   * data/changelog-file/ubuntu-dists:
     + [CW] Add natty as a valid Ubuntu distribution, and remove the EOLed
diff --git a/t/tests/watch-file-template/debian/debian/watch b/t/tests/watch-file-template/debian/debian/watch
new file mode 100644
index 0000000..fb203ac
--- /dev/null
+++ b/t/tests/watch-file-template/debian/debian/watch
@@ -0,0 +1,3 @@
+version=3
+# Example watch control file for uscan
+http://www.example.com/software/foo/ .*/foo-([^-]+)\.tar\.gz
diff --git a/t/tests/watch-file-template/desc b/t/tests/watch-file-template/desc
new file mode 100644
index 0000000..417371b
--- /dev/null
+++ b/t/tests/watch-file-template/desc
@@ -0,0 +1,6 @@
+Testname: watch-file-template
+Sequence: 6000
+Type: non-native
+Version: 1.0-1
+Description: Test for dh_make(1) templates
+Test-For: debian-watch-contains-dh_make-template
diff --git a/t/tests/watch-file-template/tags b/t/tests/watch-file-template/tags
new file mode 100644
index 0000000..f6885fd
--- /dev/null
+++ b/t/tests/watch-file-template/tags
@@ -0,0 +1 @@
+I: watch-file-template source: debian-watch-contains-dh_make-template
diff --git a/t/tests/basic-3.0-native/debian/README b/t/tests/watch-file-template/upstream/README
similarity index 100%
copy from t/tests/basic-3.0-native/debian/README
copy to t/tests/watch-file-template/upstream/README

-- 
Debian package checker


Reply to: