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

lintian: r1173 - in trunk: checks debian testset testset/debug/debian



Author: rra
Date: 2008-02-05 02:56:18 +0100 (Tue, 05 Feb 2008)
New Revision: 1173

Modified:
   trunk/checks/debhelper
   trunk/checks/debhelper.desc
   trunk/debian/changelog
   trunk/testset/debug/debian/rules
   trunk/testset/tags.debug
Log:
* checks/debhelper:
  + [RA] Add checks for versioned debhelper dependencies for dh_icons
    and dh_installifupdown.  Thanks, Evgeni Golov.  (Closes: #463028)


Modified: trunk/checks/debhelper
===================================================================
--- trunk/checks/debhelper	2008-02-05 01:20:41 UTC (rev 1172)
+++ trunk/checks/debhelper	2008-02-05 01:56:18 UTC (rev 1173)
@@ -82,8 +82,16 @@
 			   dh_usrlocal
 			   );
 
+# The version at which debhelper commands were introduced.  Packages that use
+# one of these commands must have a dependency on that version of debhelper or
+# newer.
+my %versions
+    = (dh_icons           => '5.0.51~',
+       dh_installifupdown => '5.0.44~');
+
 open(RULES, '<', "debfiles/rules") or fail("cannot read debian/rules: $!");
 my $dhcompatvalue;
+my @versioncheck;
 while (<RULES>) {
     if (m/^\s+(dh_\w+)/) {
         my $dhcommand = $1;
@@ -101,6 +109,9 @@
 	if ($commands{$dhcommand} and not m/\s+\-n\s+/) {
 	    $needtomodifyscripts = 1;
 	}
+        if ($versions{$dhcommand}) {
+            push (@versioncheck, $dhcommand);
+        }
 	$seencommand = 1;
 	$needbuilddepends = 1;
     } elsif (m,^include\s+/usr/share/cdbs/1/rules/debhelper.mk,) {
@@ -224,10 +235,14 @@
 $needversiondepends ||= 1;
 if ($needversiondepends < 4) {
     tag "package-uses-deprecated-debhelper-compat-version", $needversiondepends;
-}
-
-if ($needversiondepends > 4 and ! Dep::implies($depends, Dep::parse("debhelper (>= $needversiondepends)"))) {
+} elsif ($needversiondepends > 4 and ! Dep::implies($depends, Dep::parse("debhelper (>= $needversiondepends)"))) {
     tag "package-lacks-versioned-build-depends-on-debhelper", $needversiondepends;
+} elsif (@versioncheck) {
+    for my $program (@versioncheck) {
+        my $required = $versions{$program};
+        tag 'debhelper-script-needs-versioned-build-depends', $program, "(>= $required)"
+            unless Dep::implies($depends, Dep::parse("debhelper (>= $required)"));
+    }
 }
 
 }

Modified: trunk/checks/debhelper.desc
===================================================================
--- trunk/checks/debhelper.desc	2008-02-05 01:20:41 UTC (rev 1172)
+++ trunk/checks/debhelper.desc	2008-02-05 01:56:18 UTC (rev 1173)
@@ -104,3 +104,11 @@
  the current Python policy by putting 2 in <tt>debian/pycompat</tt>.  This
  may mean that the package has not been converted to the current Python
  policy, in which case it probably should be.
+
+Tag: debhelper-script-needs-versioned-build-depends
+Type: warning
+Info: The given debhelper script was introduced in a later version of
+ debhelper than the package Build-Depends on.  The package Build-Depends
+ should be updated to require that version of debhelper.  Giving the
+ version followed by <tt>~</tt> is recommended so that backports will
+ satisfy the dependency.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-02-05 01:20:41 UTC (rev 1172)
+++ trunk/debian/changelog	2008-02-05 01:56:18 UTC (rev 1173)
@@ -20,6 +20,8 @@
     + [FL] Update list of debhelper commands that modify maintainer
        scripts. Add dh_icons, dh_installudev, dh_pysupport, dh_pycentral
        and rename dh_installtexfonts to dh_installtex.
+    + [RA] Add checks for versioned debhelper dependencies for dh_icons
+      and dh_installifupdown.  Thanks, Evgeni Golov.  (Closes: #463028)
   * checks/fields{.desc,}:
     + [RA] The CDBS ant rules are in class, not rules.  Thanks, Cyril
       Brulebois.  (Closes: #460168)

Modified: trunk/testset/debug/debian/rules
===================================================================
--- trunk/testset/debug/debian/rules	2008-02-05 01:20:41 UTC (rev 1172)
+++ trunk/testset/debug/debian/rules	2008-02-05 01:56:18 UTC (rev 1173)
@@ -47,6 +47,9 @@
 	cp $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/usr/lib/libhello.so.0.0 \
 	    $(CURDIR)/debian/libhello0-dbg/usr/lib/libhello.so.dbg
 
+	# Requires a versioned dependency.
+	dh_icons
+
 	dh_link
 	dh_compress
 	dh_fixperms

Modified: trunk/testset/tags.debug
===================================================================
--- trunk/testset/tags.debug	2008-02-05 01:20:41 UTC (rev 1172)
+++ trunk/testset/tags.debug	2008-02-05 01:56:18 UTC (rev 1173)
@@ -7,6 +7,7 @@
 I: debug source: non-standard-architecture kfreebsd-i386
 I: debug source: non-standard-architecture ppc64
 W: debug source: changelog-should-not-mention-nmu
+W: debug source: debhelper-script-needs-versioned-build-depends dh_icons (>= 5.0.51~)
 W: debug source: debian-rules-sets-DH_COMPAT line 5
 W: debug source: out-of-date-standards-version 3.7.0 (current is 3.7.3)
 W: hello: binary-without-manpage usr/bin/hello


Reply to: