[dh-r] 01/01: Make sure no empty package is injected inbetween ', , ' in case of empty $rdepends

Andreas Tille tille at debian.org
Tue Nov 29 13:52:59 UTC 2016


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

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

commit fae0c92d39611b4e8ed9b04d0c60e03f802fc556
Author: Andreas Tille <tille at debian.org>
Date:   Tue Nov 29 14:52:29 2016 +0100

    Make sure no empty package is injected inbetween ', ,' in case of empty $rdepends
---
 debian/changelog  | 2 ++
 scripts/dh-make-R | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index f365b72..0b05767 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ dh-r (20161031) UNRELEASED; urgency=medium
     -d/control: Switch to the canonical URL of CRAN and Bioconductor
     -d/copyright: Add the Upstream-Contact and Source fields
     -d/watch: Switch to HTTPS for the Bioconductor link
+    -d/control: Make sure no empty package is injected inbetween ', ,'
+                in case of empty $rdepends
 
  -- Dylan Aïssi <bob.dybian at gmail.com>  Sun, 30 Oct 2016 22:37:22 +0100
 
diff --git a/scripts/dh-make-R b/scripts/dh-make-R
index dbd0419..4908e53 100755
--- a/scripts/dh-make-R
+++ b/scripts/dh-make-R
@@ -66,7 +66,12 @@ my $rdepends = deps_concat(Debian::Debhelper::Buildsystem::R::parse_depends("Dep
 my $rrecommends = deps_concat(Debian::Debhelper::Buildsystem::R::parse_depends("Recommends", $desc->{Recommends}, \%apthash));
 my $rsuggests = deps_concat(Debian::Debhelper::Buildsystem::R::parse_depends("Suggests", $desc->{Suggests}, \%apthash));
 my $rimports = deps_concat(Debian::Debhelper::Buildsystem::R::parse_depends("Imports", $desc->{Imports}, \%apthash));
-my $builddeps = deps_concat("debhelper (>= 9)", "dh-r", "r-base-dev", $rdepends, $rimports);
+my $builddeps;
+if ( $rdepends ) {
+    $builddeps = deps_concat("debhelper (>= 9)", "dh-r", "r-base-dev", $rdepends, $rimports);
+} else {
+    $builddeps = deps_concat("debhelper (>= 9)", "dh-r", "r-base-dev", $rimports);
+}
 
 say "I: Package depends: $rdepends";
 say "I: Package imports: $rimports";

-- 
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