[SCM] Debian package checker branch, master, updated. 2.5.6-72-g653ff5c
The following commit has been merged in the master branch:
commit 653ff5c2f7139920dc6ce9cbf8f965ac495835e8
Author: Niels Thykier <niels@thykier.net>
Date: Sun Apr 8 13:16:38 2012 +0200
c/fields: Check for bad release candidate versions
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/checks/fields b/checks/fields
index 7b5ead5..542c56c 100644
--- a/checks/fields
+++ b/checks/fields
@@ -216,6 +216,17 @@ if (not defined $info->field('version')) {
if ($version =~ /\+b\d+$/ && $type eq 'source') {
tag 'binary-nmu-debian-revision-in-source', $version;
}
+ if ($upstream =~ m/[^~a-z](rc|alpha|beta|dev|pre(?:view|release)?)([^a-z].*|\z)/) {
+ my $expected = $upstream;
+ my $rc = $1;
+ my $rest = $2//'';
+ my $suggestion;
+ # Remove the rc-part and the preceeding symbol (if any).
+ $expected =~ s/[\.\+\-\:]?\Q$rc\E.*//;
+ $suggestion = "$expected~$rc$rest";
+ tag 'rc-version-greater-than-expected-version', $upstream, '>', $expected, "(consider using $suggestion)",
+ if $info->native or ($debian eq 1 or $debian =~ m,^0(?:\.1|ubuntu1)?$,);
+ }
# Checks for the dfsg convention for repackaged upstream
# source. Only check these against the source package to not
diff --git a/checks/fields.desc b/checks/fields.desc
index 084063b..002a058 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -1077,3 +1077,12 @@ Info: The package appears to be a transitional package, but it is not
.
Using oldlibs/extra assists package managers in handling the
transition package correctly.
+
+Tag: rc-version-greater-than-expected-version
+Severity: normal
+Certainty: possible
+Ref: policy 5.6.12
+Info: The package appears to be a release candidate or preview release, but
+ the version sorts higher than the expected final release.
+ .
+ Note this check is limited to new upstream releases of non-native packages.
diff --git a/debian/changelog b/debian/changelog
index dbc9b80..8921067 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ lintian (2.5.7) UNRELEASED; urgency=low
* Summary of tag changes:
+ Added:
+ - rc-version-greater-than-expected-version
- udeb-uses-unsupported-compression-for-data-tarball
+ Removed:
- ancient-dpkg-long-filenames-check
@@ -51,6 +52,11 @@ lintian (2.5.7) UNRELEASED; urgency=low
+ [NT] Remove special handling of the Ubuntu specific field,
"original-maintainer". This field is now handled by vendor
specific data files. (Closes: #649852)
+ + [JW,NT] Check for common mistakes with preview release and
+ release candidate versions. For non-native packages, this
+ check is only done on initial uploads of new upstream
+ releases. Thanks to Stefano Rivera and Julian Taylor for
+ their additional suggestions. (Closes: #649277)
* checks/files{,.desc}:
+ [NT] Remove "manual" lazy loads of data files.
+ [NT] Remove code for the uses-FHS-doc-dir tag.
diff --git a/t/tests/fields-version-bad-rc/desc b/t/tests/fields-version-bad-rc/desc
new file mode 100644
index 0000000..c835142
--- /dev/null
+++ b/t/tests/fields-version-bad-rc/desc
@@ -0,0 +1,6 @@
+Testname: fields-version-bad-rc
+Sequence: 6000
+Version: 1.0+rc3-1
+Description: Test for bad release cand. versions
+Type: non-native
+Test-For: rc-version-greater-than-expected-version
diff --git a/t/tests/fields-version-bad-rc/tags b/t/tests/fields-version-bad-rc/tags
new file mode 100644
index 0000000..96b9b3f
--- /dev/null
+++ b/t/tests/fields-version-bad-rc/tags
@@ -0,0 +1,2 @@
+W: fields-version-bad-rc source: rc-version-greater-than-expected-version 1.0+rc3 > 1.0 (consider using 1.0~rc3)
+W: fields-version-bad-rc: rc-version-greater-than-expected-version 1.0+rc3 > 1.0 (consider using 1.0~rc3)
diff --git a/t/tests/changelog-file-dch-wrong-name/upstream/README b/t/tests/fields-version-bad-rc/upstream/README
similarity index 100%
copy from t/tests/changelog-file-dch-wrong-name/upstream/README
copy to t/tests/fields-version-bad-rc/upstream/README
--
Debian package checker
Reply to: