Re: Bug#750017: perl-policy: All packages using Perl vendorarch directory need a perlapi-* dependency
On Sun, Jun 01, 2014 at 05:53:28PM +0200, gregor herrmann wrote:
> I've tried this for libcommon-sense-perl now, with the idea taken from dh_perl(1):
Looks OK to me. The PERL_CURRENT + PERL_NEXT stuff probably isn't
needed anymore.
FWIW I think eventually dh_perl should be changed, possibly with
something like the attached patch (which I haven't found the
time to test properly yet.)
--
Niko Tyni ntyni@debian.org
>From 5218415a469dc9a70b4ad9878da445a726c4cc24 Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Sat, 31 May 2014 21:04:40 +0300
Subject: [PATCH] Add perlapi-* dependency on packages installed to
$Config{vendorarch}
$Config{vendorarch} can now change between perl versions, so stricter
dependencies are needed for partial upgrades. See #750017 for details.
This currently affects six packages in the archive.
---
dh_perl | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dh_perl b/dh_perl
index ed18f91..cf5c8fa 100755
--- a/dh_perl
+++ b/dh_perl
@@ -86,6 +86,7 @@ my $version;
use constant PROGRAM => 1;
use constant PM_MODULE => 2;
use constant XS_MODULE => 4;
+use constant ARCHDEP_MODULE => 8;
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
@@ -101,6 +102,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
return unless -f;
$deps |= PM_MODULE if /\.pm$/;
$deps |= XS_MODULE if /\.so$/;
+ $deps |= ARCHDEP_MODULE
+ if $File::Find::dir =~ /\Q$vendorarch\E$/;
}, @dirs if @dirs;
# find scripts
@@ -129,10 +132,11 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
addsubstvar($package, "perl:Depends", $perl, $version)
unless $perl eq 'perl-base' && ! length($version);
- # add perlapi-<ver> for XS modules
+ # add perlapi-<ver> for XS modules and other modules
+ # installed into vendorarch
addsubstvar($package, "perl:Depends",
"perlapi-" . ($Config{debian_abi} || $Config{version}))
- if $deps & XS_MODULE;
+ if $deps & ( XS_MODULE | ARCHDEP_MODULE );
}
# MakeMaker always makes lib and share dirs, but typically
--
2.0.0.rc4
Reply to: