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

Bug#304866: Add warning for build-depends on lib<something not ending with -dev>



tags 304866 +patch
kthxbye

Patch attached.


Regards,

-- 
Chris Lamb, UK                                       chris@chris-lamb.co.uk
                                                            GPG: 0x634F9A20
Index: control-file.desc
===================================================================
--- control-file.desc	(revision 1117)
+++ control-file.desc	(working copy)
@@ -17,6 +17,11 @@
   $ iconv -f ISO-8859-1 -t UTF-8 control &gt; control.new
   $ mv control.new control
 
+Tag: build-depends-on-libfoo-not-libfoo-dev
+Type: warning
+Info: The package Build-Depends on a lib<something> package instead of
+ a lib<something>-dev package.
+
 Tag: build-info-in-binary-control-file-section
 Type: error
 Ref: policy 5.2
Index: control-file
===================================================================
--- control-file	(revision 1117)
+++ control-file	(working copy)
@@ -71,6 +71,11 @@
 
 my ($header, @binary_controls) = read_dpkg_control("debfiles/control");
 
+for my $build_dep (map { s/\s*\(.*\)//; $_ } split /\s*,\s*/, $header->{'build-depends'}) {
+	tag("build-depends-on-libfoo-not-libfoo-dev", $build_dep)
+		if ($build_dep =~ m,^lib.+[^(-dev)]$,);
+}
+
 for my $binary_control (@binary_controls) {
 	tag "build-info-in-binary-control-file-section", "Package ".$binary_control->{"package"}
 	    if ($binary_control->{"build-depends"} || $binary_control->{"build-depends-indep"} ||

Attachment: signature.asc
Description: PGP signature


Reply to: