Bug#878027: dh-r fails with --sourcedirectory
Vincent Danjean
vdanjean at debian.org
Sun Oct 8 20:26:43 UTC 2017
Package: dh-r
Version: 20161219
Severity: important
Tags: patch
Hi,
I'm using dh-r in a package (not yet uploaded to debian) where R sources
are not at the root of the package. Hence, I'm using:
%:
dh $@ --sourcedirectory path/to/R/sources
The package fails to build at the install step as it cannot find the
DESCRIPTION file.
Looking at the source, it seems that, indeed, at this place, the
DESCRIPTION file is assumed to be at the root of the package.
Here is a small patch that fix the problem for me:
--- /usr/share/perl5/Debian/Debhelper/Buildsystem/R.pm 2016-12-19 11:22:15.000000000 +0100
+++ ../R.pm 2017-10-08 22:19:43.008443841 +0200
@@ -32,8 +32,9 @@
}
sub parse_description {
+ my $this=shift;
my $desc = Dpkg::Control->new(type => Dpkg::Control::CTRL_UNKNOWN);
- $desc->load("DESCRIPTION");
+ $desc->load($this->get_sourcepath("DESCRIPTION"));
return $desc;
}
@@ -90,7 +91,7 @@
my $this = shift;
my $destdir = shift;
- my $desc = parse_description(); # key-value hash for the DESCRIPTION file
+ my $desc = $this->parse_description(); # key-value hash for the DESCRIPTION file
my $srcctrl = Dpkg::Control::Info->new()->get_source();
my $sourcepackage = $this->sourcepackage();
Regards,
Vincent
-- System Information:
Debian Release: buster/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'oldstable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (200, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armel, mipsel
Kernel: Linux 4.12.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), LANGUAGE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages dh-r depends on:
ii dctrl-tools 2.24-2+b1
ii debhelper 10.9
ii r-base-dev 3.4.2-1
dh-r recommends no packages.
dh-r suggests no packages.
-- no debconf information
More information about the debian-science-maintainers
mailing list