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

Bug#551793: lintian: patch for #551793



tags 551793 + patch
thanks

Here's a patch which implements required feature.
Regards,

-- 
  .''`.
 :  :' :   Luca Falavigna <dktrkranz@debian.org>
 `.  `'
   `-
diff --git a/checks/control-file b/checks/control-file
index 180be7c..e73a436 100644
--- a/checks/control-file
+++ b/checks/control-file
@@ -267,6 +267,21 @@ for my $i (0 .. $#descriptions) {
 	}
 }
 
+# Check for python*-dev build-dependency with Architecture: any packages
+my $isNotAll = 0;
+my $pydev_bd;
+my $pydev_bdi;
+$pydev_bd = $header->{"build-depends"} =~ /python(-all|[\d.])*-dev/ if $header->{"build-depends"};
+$pydev_bdi = $header->{"build-depends-indep"} =~ /python(-all|[\d.])*-dev/ if $header->{"build-depends-indep"};
+if ($pydev_bd or $pydev_bdi) {
+	for my $control (@binary_controls) {
+		foreach ($control->{architecture}) {
+			$isNotAll = 1 if ($_ ne 'all');
+		}
+	}
+	tag 'python-dev-with-no-arch-any-packages' if ($isNotAll eq 0);
+}
+
 }
 
 1;
diff --git a/checks/control-file.desc b/checks/control-file.desc
index 09bdec9..efb9f75 100644
--- a/checks/control-file.desc
+++ b/checks/control-file.desc
@@ -161,3 +161,17 @@ Info: The given package appears to be a shared library -dev package, but
  dependency since it would break binary NMUs.  Instead, a dependency of
  <tt>(>= ${source:Upstream-Version}), (<< ${source:Version}.1~)</tt> or
  similar is usually the correct approach.
+
+Tag: python-dev-with-no-arch-any-packages
+Severity: normal
+Certainty: possible
+Info: The given package appears to have a Python development package
+ (python-dev, python-all-dev or pythonX.Y-dev) listed in its Build-Depends
+ or Build-Depends-Indep fields, but only "Architecture: all" packages are
+ created. Python applications and modules do not usually require such
+ packages, so you should consider removing them in favour of python,
+ python-all or pythonX.Y packages.
+ .
+ If you are building a Python extension instead, you should have
+ development packages listed in Build-Depends, but you need at least one
+ "Architecture: any" package.

Attachment: signature.asc
Description: PGP signature


Reply to: