diff options
author | Peter Pentchev <roam@ringlet.net> | 2018-05-05 00:09:08 +0300 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2018-05-10 06:10:40 +0000 |
commit | 51cd25c9903d0609086c2d423b01995e517301d6 (patch) | |
tree | 55bdec0053923d44084a4bb1955dd43ee8fe3d00 | |
parent | 0e103163a8deac65724e543250234c6e82d99906 (diff) | |
download | debhelper-51cd25c9903d0609086c2d423b01995e517301d6.tar.gz |
Allow whitespace around the debhelper-compat B-D.
This allows a newline before or after the debhelper-compat dependency,
e.g. when all the dependencies are listed on separate rows.
Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r-- | lib/Debian/Debhelper/Dh_Lib.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Debian/Debhelper/Dh_Lib.pm b/lib/Debian/Debhelper/Dh_Lib.pm index 7ba987d3..781cc609 100644 --- a/lib/Debian/Debhelper/Dh_Lib.pm +++ b/lib/Debian/Debhelper/Dh_Lib.pm @@ -1465,7 +1465,8 @@ sub getpackages { my ($dh_compat_bd, $final_level); for my $field (sort(keys(%bd_fields))) { my $value = join(' ', @{$bd_fields{$field}}); - $value =~ s/\s*,\s*$//; + $value =~ s/^\s*//; + $value =~ s/\s*(?:,\s*)?$//; for my $dep (split(/\s*,\s*/, $value)) { if ($dep =~ m/^debhelper-compat\s*[(]\s*=\s*(${PKGVERSION_REGEX})\s*[)]$/) { my $version = $1; |