[dh-r] 33/43: Add repo detection to dh-make-R
Gordon Ball
chronitis-guest at moszumanska.debian.org
Thu Sep 15 13:45:37 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 cc5b91ccc44f636d34d5e5893cab4bdb795e7f89
Author: Gordon Ball <gordon at chronitis.net>
Date: Thu Sep 15 11:09:13 2016 +0200
Add repo detection to dh-make-R
---
scripts/dh-make-R | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/scripts/dh-make-R b/scripts/dh-make-R
index 048b801..fbf79f6 100755
--- a/scripts/dh-make-R
+++ b/scripts/dh-make-R
@@ -2,7 +2,8 @@
use feature say;
use strict;
-use Debian::Debhelper::Buildsystem::R qw(parse_description parse_deps get_repo);
+use Debian::Debhelper::Buildsystem::R qw(parse_deps);
+use Dpkg::Control;
use Dpkg::Deps qw(deps_concat deps_parse);
( -e "DESCRIPTION") or die "No DESCRIPTION file, is this an R package?";
@@ -10,7 +11,24 @@ use Dpkg::Deps qw(deps_concat deps_parse);
my $desc = Dpkg::Control->new(type => Dpkg::Control::CTRL_UNKNOWN);
$desc->load("DESCRIPTION");
-my $repo = Debian::Debhelper::Buildsystem::R::get_repo($desc);
+my $repo = "CRAN";
+if ($opt_repo) {
+ $repo = $opt_repo;
+ say "I: Using repo=$repo from --repo";
+} elsif (length $desc->{Repo}) {
+ # this appears to be set ("CRAN") for packages originating from CRAN,
+ # but is not set for bioconductor, nor for packages direct from upstream
+ $repo = $desc->{Repo};
+ say "I: Using repo=$repo from DESCRIPTION::Repository";
+} elsif (length $desc->{biocViews}) {
+ # however, biocViews is (presumably) only going to be set for bioconductor
+ # packages, so nonzero should identify
+ $repo = "BIOC";
+ say "I: Using repo=$repo due to existence of DESCRIPTION::biocViews";
+} else {
+ say "I: Using repo=$repo by default";
+}
+
my $debname = "r-" . lc $repo . "-" . lc $desc->{Package};
say "I: Package source and binary name: $debname";
--
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