The following commit has been merged in the master branch:
commit 7f558220ee4a6f4669ec0b134619158388aefa72
Author: Russ Allbery <[email protected]>
Date:   Fri Feb 6 22:37:27 2009 -0800

    Warn of dfsg versions in native packages
    
    * checks/fields{,.desc}:
      + [RA] Warn of dfsg versions in native packages.

diff --git a/checks/fields b/checks/fields
index f647c85..897b332 100644
--- a/checks/fields
+++ b/checks/fields
@@ -190,6 +190,12 @@ if (not defined $info->field('version')) {
                if ($version =~ /\+b\d+$/ && $type eq "source") {
                        tag "binary-nmu-debian-revision-in-source", "$version";
                }
+
+               # Checks for the dfsg convention for repackaged upstream source.
+               if ($type eq 'source' and $version =~ /dfsg/ and $info->native) 
{
+                       tag 'dfsg-version-in-native-package', $version;
+               }
+
                my $name = $info->field('package');
                if ($name && $perl_core_provides->known($name) &&
                    perl_core_has_version($name, '>=', $upstream)) {
diff --git a/checks/fields.desc b/checks/fields.desc
index 084dacd..5f20f1b 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -813,6 +813,15 @@ Info: The version number of your source package ends in +b 
and a number or
  +b form is the current standard; the three-part version number now
  obsolete.)
 
+Tag: dfsg-version-in-native-package
+Severity: normal
+Certainty: certain
+Info: The version number of this package contains "dfsg", but it's a
+ native package.  "dfsg" is conventionally used in the upstream version of
+ packages that are repackaged for Debian Free Software Guidelines
+ compliance reasons.  The convention doesn't make sense in native
+ packages.
+
 Tag: redundant-bugs-field
 Severity: normal
 Certainty: certain
diff --git a/debian/changelog b/debian/changelog
index ac4e7ae..9710095 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,7 @@ lintian (2.2.3) UNRELEASED; urgency=low
       archive section.
     + [RA] Warn about Homepage fields pointing to search.cpan.org pages
       containing a version number.  Based on a patch by Paul Wise.
+    + [RA] Warn of dfsg versions in native packages.
   * checks/files:
     + [ADB] Don't report duplicate-font-file for udebs.  Patch by Raphael
       Geissert.  (Closes: #514095)
diff --git a/t/tests/basic-non-native/upstream/README 
b/t/tests/fields-version-dfsg-native/debian/README
similarity index 100%
copy from t/tests/basic-non-native/upstream/README
copy to t/tests/fields-version-dfsg-native/debian/README
diff --git a/t/tests/fields-version-dfsg-native/desc 
b/t/tests/fields-version-dfsg-native/desc
new file mode 100644
index 0000000..2200950
--- /dev/null
+++ b/t/tests/fields-version-dfsg-native/desc
@@ -0,0 +1,5 @@
+Testname: fields-version-dfsg-native
+Sequence: 6000
+Version: 1.0.dfsg1
+Description: Use of dfsg in a native package
+Check-For: dfsg-version-in-native-package
diff --git a/t/tests/fields-version-dfsg-native/tags 
b/t/tests/fields-version-dfsg-native/tags
new file mode 100644
index 0000000..4158133
--- /dev/null
+++ b/t/tests/fields-version-dfsg-native/tags
@@ -0,0 +1 @@
+W: fields-version-dfsg-native source: dfsg-version-in-native-package 1.0.dfsg1

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to