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

lintian: r1316 - in trunk: checks debian testset/scripts/debian/patches



Author: djpig
Date: 2008-05-20 03:44:33 +0200 (Tue, 20 May 2008)
New Revision: 1316

Modified:
   trunk/checks/patch-systems
   trunk/debian/changelog
   trunk/testset/scripts/debian/patches/00list
Log:
* checks/patch-systems:
  + Add basic support for dpatch list files which use cpp for
    preprocessing.  Patch by J?\195?\182rg Sommer.  (Closes: #477057)


Modified: trunk/checks/patch-systems
===================================================================
--- trunk/checks/patch-systems	2008-05-20 01:19:51 UTC (rev 1315)
+++ trunk/checks/patch-systems	2008-05-20 01:44:33 UTC (rev 1316)
@@ -58,11 +58,27 @@
 		if (! -r "debfiles/patches/00list") {
 			tag "dpatch-build-dep-but-no-patch-list", $pkg;
 		} else {
+			my $list_uses_cpp = 0;
+			if (open(OPTS, '<', "debfiles/patches/00options")) {
+				while(<OPTS>) {
+					if (/DPATCH_OPTION_CPP=1/) {
+						$list_uses_cpp = 1;
+						last;
+					}
+				}
+				close(OPTS);
+			}
 			if (open(IN, '<', "debfiles/patches/00list")) {
 				my @patches;
 				while(<IN>) {
 					chomp;
-					next if (/^\#/); #ignore comments
+					next if (/^\#/); #ignore comments or CPP directive
+					s%//.*%% if $list_uses_cpp; # remove C++ style comments
+					if ($list_uses_cpp && m%/\*%) {
+						# remove C style comments
+						$_ .= <IN> while($_ !~ m%\*/%);
+						s%/\*[^*]*\*/%%g;
+					}
 					next if (/^\s*$/); #ignore blank lines
 					push @patches, split(' ', $_);
 				}

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-05-20 01:19:51 UTC (rev 1315)
+++ trunk/debian/changelog	2008-05-20 01:44:33 UTC (rev 1316)
@@ -18,6 +18,9 @@
   * checks/menu-format:
     + [FL] Don't issue false positives about menu files in format menu-2.
       We don't check them for errors yet, though.  (Closes: #478578)
+  * checks/patch-systems:
+    + [FL] Add basic support for dpatch list files which use cpp for
+      preprocessing.  Patch by Jörg Sommer.  (Closes: #477057)
   
   * frontend/lintian:
     + [FL] Don't issue a warning about Distribution: UNRELEASED in

Modified: trunk/testset/scripts/debian/patches/00list
===================================================================
--- trunk/testset/scripts/debian/patches/00list	2008-05-20 01:19:51 UTC (rev 1315)
+++ trunk/testset/scripts/debian/patches/00list	2008-05-20 01:44:33 UTC (rev 1316)
@@ -1,4 +1,9 @@
 01_not_here_right_now.dpatch
 
 # some comment
-02_i_dont_have_a_description.patch 03_specified_without_dpatch
+/* some more
+   elaborate comment
+   which needs DPATCH_OPTION_CPP=1
+  */02_i_dont_have_a_description.patch 03_specified_without_dpatch
+
+// and again a comment


Reply to: