tag 751684 patch
thanks
On Sun, Jun 15, 2014 at 07:51:57PM +0200, gregor herrmann wrote:
> On Sun, 15 Jun 2014 18:47:44 +0300, Niko Tyni wrote:
>
> > There's a pending Perl policy change discussed in #750017 that requires
> > the handful of packages in the archive that install nonbinary Perl modules
> > into /usr/lib/perl5 (or, more generally, $Config{vendorarch} to add a
> > perlapi-* dependency. The attached mostly untested patch implements this
> > in dh_perl.
> I've tested the patch now, and it didn't work for the first package I
> tried (libalien-wxwidgets-perl):
>
> The regexp does not match, $File::Find::dir contains subdirectories
> (debian/libalien-wxwidgets-perl/usr/lib/x86_64-linux-gnu/perl5/5.20/Alien
> etc.)
Thanks! Updated patch attached.
> I've now tested this updated patch with
> - 3 of the "special" packages mentioned in #750017
> (after removing the manual perlapi-* stuff from d/rules)
> - 3 random arch:any packages, and
> - 3 random arch:all packages
>
> and haven't seen anything unexpected.
I've also tested it now, with both Perl 5.18 and 5.20, and
it's all looking good to me. Tagging accordingly.
--
Niko Tyni [email protected]
>From b791b3d7808353ab45b94db5e321da9d3eec53c0 Mon Sep 17 00:00:00 2001
From: Niko Tyni <[email protected]>
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..dcdf589 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