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

[SCM] Debian package checker branch, master, updated. 2.1.3-37-gfad5411



The following commit has been merged in the master branch:
commit 09682a344b5f990a958478c058c53a2cf9506cd0
Author: Russ Allbery <rra@debian.org>
Date:   Tue Dec 30 15:04:59 2008 -0800

    Warn about Debian revisions containing release names
    
    * checks/changelog-file{,.desc}:
      + [RA] Warn of Debian version numbers containing "testing", "stable",
        or "unstable", or with release code names for uploads not targeted
        at that release, except in NMUs.  Based on a patch by Raphael
        Geissert.  (Closes: #498876)

diff --git a/checks/changelog-file b/checks/changelog-file
index 1779bd6..e83257f 100644
--- a/checks/changelog-file
+++ b/checks/changelog-file
@@ -313,6 +313,28 @@ if (@entries) {
         tag "improbable-bug-number-in-closes", $bug if ($bug < 100);
     }
 
+    # unstable, testing, and stable shouldn't be used in Debian version
+    # numbers.  unstable should get a normal version increment and testing and
+    # stable should get suite-specific versions.
+    #
+    # NMUs get a free pass because they need to work with the version number
+    # that was already there.
+    my $version;
+    if ($info->native) {
+        $version = $entry->Version;
+    } else {
+        ($version) = (split('-', $entry->Version))[-1];
+    }
+    unless (not $info->native and $version =~ /\./) {
+        if ($info->native and $version =~ /testing|(un)?stable/i) {
+            tag 'version-refers-to-distribution', $entry->Version;
+        } elsif ($version =~ /woody|sarge|etch|lenny|squeeze/) {
+            if ($entry->Distribution =~ /^(unstable|experimental)$/) {
+                tag 'version-refers-to-distribution', $entry->Version;
+            }
+        }
+    }
+
     # Compare against NEWS.Debian if available.
     if ($news and $news->Version and $entry->Version eq $news->Version) {
         for my $field (qw/Distribution Urgency/) {
diff --git a/checks/changelog-file.desc b/checks/changelog-file.desc
index 4e09511..68ba376 100644
--- a/checks/changelog-file.desc
+++ b/checks/changelog-file.desc
@@ -279,3 +279,18 @@ Info: The latest entries in the Debian changelog file and NEWS.Debian file
  are for the same version but the given field doesn't match.  The
  changelog information is canonical and the NEWS.Debian information is
  ignored, but it may be confusing to users to have them be different.
+
+Tag: version-refers-to-distribution
+Severity: minor
+Certainty: certain
+Info: The Debian portion of the package version contains a reference to a
+ particular Debian release or distribution.  This should only be done for
+ uploads targeted at a particular release, not at unstable or
+ experimental, and should refer to the release by version number or code
+ name.
+ .
+ Using "testing" or "stable" in a package version targeted at the current
+ testing or stable release is less informative than using the code name or
+ version number and may cause annoying version sequencing issues if the
+ package doesn't change before the next release cycle starts.
+Ref: devref 5.13.3
diff --git a/debian/changelog b/debian/changelog
index 668d33b..82e3c05 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,10 +12,16 @@ lintian (2.1.4) UNRELEASED; urgency=low
       - preinst-interpreter-without-predepends
       - script-calls-init-script-directly
       - unknown-control-interpreter (split from unusual-interpreter)
+      - version-refers-to-distribution
     + Removed
       - desktop-file-but-no-dh_desktop-call
       - interpreter-without-predep
 
+  * checks/changelog-file{,.desc}:
+    + [RA] Warn of Debian version numbers containing "testing", "stable",
+      or "unstable", or with release code names for uploads not targeted
+      at that release, except in NMUs.  Based on a patch by Raphael
+      Geissert.  (Closes: #498876)
   * checks/copyright-file{,.desc}:
     + [RA] Warn (severity: wishlist) about the old dh_make packaging
       copyright, which used (C) without the word or symbol.  Based on a
diff --git a/t/tests/6000_changelog-file-etch-nmu.desc b/t/tests/6000_changelog-file-etch-nmu.desc
new file mode 100644
index 0000000..15215e5
--- /dev/null
+++ b/t/tests/6000_changelog-file-etch-nmu.desc
@@ -0,0 +1,5 @@
+Testname: changelog-file-etch-nmu
+Type: non-native
+Version: 1.0-1etch1.1
+Description: Test for a code name in an unstable upload
+Test-Against: version-refers-to-distribution
diff --git a/t/tests/6000_changelog-file-etch.desc b/t/tests/6000_changelog-file-etch.desc
new file mode 100644
index 0000000..5328964
--- /dev/null
+++ b/t/tests/6000_changelog-file-etch.desc
@@ -0,0 +1,5 @@
+Testname: changelog-file-etch
+Type: non-native
+Version: 1.0-1etch1
+Description: Test for a code name in an unstable upload
+Test-For: version-refers-to-distribution
diff --git a/t/tests/6000_changelog-file-stable.desc b/t/tests/6000_changelog-file-stable.desc
new file mode 100644
index 0000000..1aed75e
--- /dev/null
+++ b/t/tests/6000_changelog-file-stable.desc
@@ -0,0 +1,7 @@
+Testname: changelog-file-stable
+Type: non-native
+Version: 1.0-1etch1
+Description: Test a stable-proposed-updates package
+Test-Against:
+ bad-distribution-in-changes-file
+ version-refers-to-distribution
diff --git a/t/tests/basic-non-native/upstream/README b/t/tests/changelog-file-etch-nmu/debian/README
similarity index 100%
copy from t/tests/basic-non-native/upstream/README
copy to t/tests/changelog-file-etch-nmu/debian/README
diff --git a/t/templates/skel/debian/changelog.in b/t/tests/changelog-file-etch-nmu/debian/debian/changelog.in
similarity index 57%
copy from t/templates/skel/debian/changelog.in
copy to t/tests/changelog-file-etch-nmu/debian/debian/changelog.in
index 240c83a..28f11b6 100644
--- a/t/templates/skel/debian/changelog.in
+++ b/t/tests/changelog-file-etch-nmu/debian/debian/changelog.in
@@ -1,6 +1,7 @@
 {$srcpkg} ({$version}) unstable; urgency=low
 
+  * Non-maintainer upload.
   * Lintian Test Suite.
   * Test: {$testname}
 
- -- {$author}  {$date}
+ -- Russ Allbery <rra@debian.org>  {$date}
diff --git a/t/tests/basic-non-native/tags b/t/tests/changelog-file-etch-nmu/tags
similarity index 100%
copy from t/tests/basic-non-native/tags
copy to t/tests/changelog-file-etch-nmu/tags
diff --git a/t/tests/basic-non-native/upstream/README b/t/tests/changelog-file-etch-nmu/upstream/README
similarity index 100%
copy from t/tests/basic-non-native/upstream/README
copy to t/tests/changelog-file-etch-nmu/upstream/README
diff --git a/t/tests/basic-non-native/upstream/README b/t/tests/changelog-file-etch/debian/README
similarity index 100%
copy from t/tests/basic-non-native/upstream/README
copy to t/tests/changelog-file-etch/debian/README
diff --git a/t/tests/changelog-file-etch/tags b/t/tests/changelog-file-etch/tags
new file mode 100644
index 0000000..354cb59
--- /dev/null
+++ b/t/tests/changelog-file-etch/tags
@@ -0,0 +1 @@
+W: changelog-file-etch: version-refers-to-distribution 1.0-1etch1
diff --git a/t/tests/basic-non-native/upstream/README b/t/tests/changelog-file-etch/upstream/README
similarity index 100%
copy from t/tests/basic-non-native/upstream/README
copy to t/tests/changelog-file-etch/upstream/README
diff --git a/t/tests/basic-non-native/upstream/README b/t/tests/changelog-file-stable/debian/README
similarity index 100%
copy from t/tests/basic-non-native/upstream/README
copy to t/tests/changelog-file-stable/debian/README
diff --git a/t/templates/skel/debian/changelog.in b/t/tests/changelog-file-stable/debian/debian/changelog.in
similarity index 54%
copy from t/templates/skel/debian/changelog.in
copy to t/tests/changelog-file-stable/debian/debian/changelog.in
index 240c83a..582861e 100644
--- a/t/templates/skel/debian/changelog.in
+++ b/t/tests/changelog-file-stable/debian/debian/changelog.in
@@ -1,4 +1,4 @@
-{$srcpkg} ({$version}) unstable; urgency=low
+{$srcpkg} ({$version}) stable-proposed-updates; urgency=low
 
   * Lintian Test Suite.
   * Test: {$testname}
diff --git a/t/tests/basic-non-native/tags b/t/tests/changelog-file-stable/tags
similarity index 100%
copy from t/tests/basic-non-native/tags
copy to t/tests/changelog-file-stable/tags
diff --git a/t/tests/basic-non-native/upstream/README b/t/tests/changelog-file-stable/upstream/README
similarity index 100%
copy from t/tests/basic-non-native/upstream/README
copy to t/tests/changelog-file-stable/upstream/README

-- 
Debian package checker


Reply to: