Control: tags -1 patch
Control: severity -1 serious

Hi Mihai,

Thanks for reporting the issue. :)

I have attached a patch that I hope you can test to see if it fixes your
problem.

Thanks,
~Niels

From bc86837c5c217e88d981103532083c270806e3b7 Mon Sep 17 00:00:00 2001
From: Niels Thykier <ni...@thykier.net>
Date: Tue, 24 Oct 2017 16:33:15 +0000
Subject: [PATCH] Dh_Lib: Fix regression in parsing of the source section

Signed-off-by: Niels Thykier <ni...@thykier.net>
---
 debian/changelog               | 4 ++++
 lib/Debian/Debhelper/Dh_Lib.pm | 5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index c17641a1..06458425 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,10 @@ debhelper (10.10.4) UNRELEASED; urgency=medium
     called as otherwise ninja tries and fails to regenerate the
     build rules.  Thanks to Helmut Grohne for reporting the
     bug.  (Closes: #879658)
+  * Dh_Lib.pm: Fix regression where the source section would not
+    be parsed leading to dbgsym packages possibly getting an
+    incorrect value in the Section field.  Thanks to Mihai
+    Moldovan for reporting the issue.  (Closes: #879667)
 
  -- Niels Thykier <ni...@thykier.net>  Tue, 24 Oct 2017 05:45:09 +0000
 
diff --git a/lib/Debian/Debhelper/Dh_Lib.pm b/lib/Debian/Debhelper/Dh_Lib.pm
index 2ee29c1d..1fbcb101 100644
--- a/lib/Debian/Debhelper/Dh_Lib.pm
+++ b/lib/Debian/Debhelper/Dh_Lib.pm
@@ -1351,6 +1351,9 @@ sub getpackages {
 				$rrr{$keyword} = 1;
 			}
 			next;
+		} elsif (/^Section:\s(.*)$/i) {
+			$source_section = $1;
+			next;
 		}
 		last if (!$_ or eof); # end of stanza.
 	}
@@ -1414,8 +1417,6 @@ sub getpackages {
 						push(@{$packages_by_type{'both'}}, $package);
 					}
 				}
-			} elsif ($section and not defined($source_section)) {
-				$source_section = $section;
 			}
 			$package='';
 			$package_type=undef;
-- 
2.14.2

Reply via email to