[dh-r] 08/43: Remove whitespace when splitting

Gordon Ball chronitis-guest at moszumanska.debian.org
Thu Sep 15 13:45:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

chronitis-guest pushed a commit to branch master
in repository dh-r.

commit 55d62e9262f27de243ce851e8cac0b1170e3678f
Author: Gordon Ball <gordon at chronitis.net>
Date:   Thu Sep 1 17:25:23 2016 +0200

    Remove whitespace when splitting
---
 dh/R.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dh/R.pm b/dh/R.pm
index 114ac81..68b1745 100644
--- a/dh/R.pm
+++ b/dh/R.pm
@@ -34,7 +34,7 @@ sub parse_depends {
     # list of debian package dependencies
 
     my $field = shift;
-    my @text = split(/,/, qx/grep-dctrl -s $field -n . DESCRIPTION/);
+    my @text = split(/,\s*/, qx/grep-dctrl -s $field -n . DESCRIPTION/);
     my @deps;
     my @aptavail = qx/grep-aptavail -P -s Package -n -e ^r-/;
     my %apthash;
@@ -42,7 +42,7 @@ sub parse_depends {
     foreach my $dep (@text) {
         chomp $dep;
         # rely on the R version format being equivalent
-        $dep =~ /^\s*(\w+)\s*(\(.*\))?$/;
+        $dep =~ /^(\w+)\s*(\(.*\))?$/;
         my $pkg = lc $1;
         my $vers = $2;
         if ($pkg eq "r") {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/dh-r.git



More information about the debian-science-commits mailing list