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

lintian: r1388 - in trunk: checks debian testset testset/scripts/debian



Author: djpig
Date: 2008-06-17 01:54:48 +0200 (Tue, 17 Jun 2008)
New Revision: 1388

Added:
   trunk/testset/scripts/debian/watch
   trunk/testset/scripts_6ds.orig.tar.gz
Modified:
   trunk/checks/watch-file
   trunk/checks/watch-file.desc
   trunk/debian/changelog
   trunk/testset/scripts/debian/changelog
   trunk/testset/scripts/debian/rules
   trunk/testset/tags.scripts
Log:
* checks/watch-file{,.desc}:
  + Check for more Debian specific strings in version
    number.  Issue an info tag if the watch file uses
    uversionsmangle to add the Debian specific string. Patch
    by Raphael Geissert.  (Closes: #485879)


Modified: trunk/checks/watch-file
===================================================================
--- trunk/checks/watch-file	2008-06-16 23:03:07 UTC (rev 1387)
+++ trunk/checks/watch-file	2008-06-16 23:54:48 UTC (rev 1388)
@@ -37,11 +37,19 @@
         return;
     }
 
+    my $version = $info->field('version');
+    # Check if the Debian version contains anything that resembles a repackaged
+    # source package sign, for fine grained version mangling check
+    my $repack;
+    if ($version =~ /(dfsg|debian|ds)/) {
+        $repack = $1;
+    }
+
     # Gather information from the watch file and look for problems we can
     # diagnose on the first time through.
     open(WATCH, '<', 'debfiles/watch') or fail("cannot open watch file: $!");
     local $_;
-    my ($watchver, $mangle);
+    my ($watchver, $mangle, $dmangle);
     while (<WATCH>) {
         next if /^\s*\#/;
         next if /^\s*$/;
@@ -66,7 +74,8 @@
             if (s/^opts=\"([^\"]+)\"// || s/^opts=(\S+)\s*//) {
                 $opts = $1;
                 @opts = split(',', $opts);
-                $mangle = 1 if grep { /^[ud]versionmangle/ } @opts;
+                $mangle = 1 if grep { /^[ud]versionmangle.*=.*($repack)/ } @opts;
+                $dmangle = 1 if grep { /^dversionmangle.*=.*($repack)/ } @opts;
             }
         }
     }
@@ -74,10 +83,13 @@
 
     # If the version of the package contains dfsg, assume that it needs to be
     # mangled to get reasonable matches with upstream.
-    my $version = $info->field('version');
-    if ($version =~ /dfsg/ and not $mangle) {
+    if ($repack and not $mangle) {
         tag 'debian-watch-file-should-mangle-version';
     }
+
+    if ($repack and $mangle and not $dmangle) {
+        tag 'debian-watch-file-should-dversionmangle-not-uversionmangle';
+    }
 }
 
 }

Modified: trunk/checks/watch-file.desc
===================================================================
--- trunk/checks/watch-file.desc	2008-06-16 23:03:07 UTC (rev 1387)
+++ trunk/checks/watch-file.desc	2008-06-16 23:54:48 UTC (rev 1388)
@@ -42,11 +42,22 @@
 
 Tag: debian-watch-file-should-mangle-version
 Type: warning
-Ref: uscan(1)
-Info: The version of this package contains <tt>dfsg</tt>, which normally
- indicates that the upstream source has been repackaged to comply with the
- Debian Free Software Guidelines, but there is no version mangling in the
+Ref: uscan(1), http://wiki.debian.org/DEHS
+Info: The version of this package contains <tt>dfsg</tt>, <tt>ds</tt>,
+ or <tt>debian</tt>, which normally indicates that the upstream source
+ has been repackaged to comply with the Debian Free Software Guidelines
+ (or similar reason), but there is no version mangling in the
  <tt>debian/watch</tt> file.  Since the <tt>dfsg</tt> string is not
  part of the upstream version, the <tt>debian/watch</tt> file should
- normally use the dversionmangle option to remove the <tt>dfsg</tt> before
+ use the dversionmangle option to remove the <tt>dfsg</tt> before
  version number comparison.
+
+Tag: debian-watch-file-should-dversionmangle-not-uversionmangle
+Type: info
+Ref: http://wiki.debian.org/DEHS
+Info: The version of this package contains <tt>dfsg</tt>, <tt>ds</tt>,
+ or <tt>debian</tt>, but a misleading upstream version mangling occurs in the
+ <tt>debian/watch</tt> file.  Since the upstream source code is not
+ <tt>dfsg</tt>-free as-is, the <tt>debian/watch</tt> file should
+ use the dversionmangle option to remove, instead of adding in uversionmangle,
+ the <tt>dfsg</tt> before version number comparison.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-06-16 23:03:07 UTC (rev 1387)
+++ trunk/debian/changelog	2008-06-16 23:54:48 UTC (rev 1388)
@@ -11,6 +11,11 @@
       non-obsolete alternatives specified and if the obsolete
       package is not listed first.  Issue an info tag for them
       though.  Patch by Adam D. Barratt.  (Closes: #486145)
+  * checks/watch-file{,.desc}:
+     + [FL] Check for more Debian specific strings in version
+       number.  Issue an info tag if the watch file uses
+       uversionsmangle to add the Debian specific string. Patch
+       by Raphael Geissert.  (Closes: #485879)
   
   * doc/CREDITS:
     + [FL] Add Raphael Geissert and Adam D. Barratt.

Modified: trunk/testset/scripts/debian/changelog
===================================================================
--- trunk/testset/scripts/debian/changelog	2008-06-16 23:03:07 UTC (rev 1387)
+++ trunk/testset/scripts/debian/changelog	2008-06-16 23:54:48 UTC (rev 1388)
@@ -1,4 +1,4 @@
-scripts (6) unstable; urgency=low
+scripts (6ds-1) unstable; urgency=low
 
   * I'm also not able to write my name.
   * Added a script in /etc/Xsession.d

Modified: trunk/testset/scripts/debian/rules
===================================================================
--- trunk/testset/scripts/debian/rules	2008-06-16 23:03:07 UTC (rev 1387)
+++ trunk/testset/scripts/debian/rules	2008-06-16 23:54:48 UTC (rev 1388)
@@ -77,8 +77,8 @@
 	dh_python
 
 	touch $(tmp)/usr/lib/python2.3/site-packages/test.pyc
-	install -m 644 debian/changelog $(tmp)/usr/share/doc/scripts/changelog
-	gzip -9 $(tmp)/usr/share/doc/scripts/changelog
+	install -m 644 debian/changelog $(tmp)/usr/share/doc/scripts/changelog.Debian
+	gzip -9 $(tmp)/usr/share/doc/scripts/changelog.Debian
 	install -m 644 debian/copyright $(tmp)/usr/share/doc/scripts/copyright
 
 	install -m 644 debian/scripts.conffiles $(tmp)/DEBIAN/conffiles

Added: trunk/testset/scripts/debian/watch
===================================================================
--- trunk/testset/scripts/debian/watch	                        (rev 0)
+++ trunk/testset/scripts/debian/watch	2008-06-16 23:54:48 UTC (rev 1388)
@@ -0,0 +1,6 @@
+# watch file with upstream version mangling
+
+version=2
+opts="uversionmangle=s/$/ds/" \
+http://www.example.com/dist/ scripts\.([\d.]+)\.tar\.gz
+

Added: trunk/testset/scripts_6ds.orig.tar.gz
===================================================================
(Binary files differ)


Property changes on: trunk/testset/scripts_6ds.orig.tar.gz
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/testset/tags.scripts
===================================================================
--- trunk/testset/tags.scripts	2008-06-16 23:03:07 UTC (rev 1387)
+++ trunk/testset/tags.scripts	2008-06-16 23:54:48 UTC (rev 1388)
@@ -16,6 +16,7 @@
 E: scripts: suid-perl-script-but-no-perl-suid-dep ./usr/bin/suidperlfoo2
 E: scripts: wrong-path-for-interpreter #!/bin/ruby1.8 != /usr/bin/ruby1.8 (./usr/bin/rubyfoo)
 E: scripts: wrong-path-for-interpreter #!/usr/local/bin/lefty != /usr/bin/lefty (./usr/bin/lefty-foo)
+I: scripts source: debian-watch-file-should-dversionmangle-not-uversionmangle
 I: scripts: init.d-script-missing-lsb-short-description /etc/init.d/lsb-other
 I: scripts: no-md5sums-control-file
 W: scripts source: ancient-standards-version 3.2.1 (current is 3.8.0)
@@ -25,7 +26,7 @@
 W: scripts source: maintainer-script-lacks-debhelper-token debian/postinst
 W: scripts source: maintainer-script-lacks-debhelper-token debian/postrm
 W: scripts source: package-uses-deprecated-debhelper-compat-version 1
-W: scripts source: source-nmu-has-incorrect-version-number 6
+W: scripts source: source-nmu-has-incorrect-version-number 6ds-1
 W: scripts source: uses-dh-python-with-no-pycompat
 W: scripts: binary-without-manpage usr/bin/envfoo
 W: scripts: binary-without-manpage usr/bin/guile-bizarre


Reply to: