[dh-r] 09/43: Newline in hash keys
Gordon Ball
chronitis-guest at moszumanska.debian.org
Thu Sep 15 13:45:31 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 70e6d3ed435f539e079f97bba0d34fee1db67abb
Author: Gordon Ball <gordon at chronitis.net>
Date: Thu Sep 1 17:35:39 2016 +0200
Newline in hash keys
---
dh/R.pm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dh/R.pm b/dh/R.pm
index 68b1745..c106b60 100644
--- a/dh/R.pm
+++ b/dh/R.pm
@@ -36,9 +36,13 @@ sub parse_depends {
my $field = shift;
my @text = split(/,\s*/, qx/grep-dctrl -s $field -n . DESCRIPTION/);
my @deps;
+
+ # get all available r-* packages from which we can guess dependencies
my @aptavail = qx/grep-aptavail -P -s Package -n -e ^r-/;
my %apthash;
@apthash{@aptavail} = ();
+
+
foreach my $dep (@text) {
chomp $dep;
# rely on the R version format being equivalent
@@ -52,10 +56,12 @@ sub parse_depends {
next;
}
- if (exists $apthash{"r-cran-$pkg"}) {
+ # check if r-cran-pkg or r-bioc-pkg exists, and add it as a
+ # dependency (or recommend/suggest)
+ if (exists $apthash{"r-cran-$pkg\n"}) {
say "I: Using r-cran-$pkg for $field:$dep";
push (@deps, "r-cran-$pkg $vers");
- } elsif (exists $apthash{"r-bioc-$pkg"}) {
+ } elsif (exists $apthash{"r-bioc-$pkg\n"}) {
say "I: Using r-bioc-$pkg for $field:$dep";
push (@deps, "r-bioc-$pkg $vers");
} else {
--
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