Package: debhelper
Version: 9.20140228
Tags: patch
User: debian-p...@lists.debian.org
Usertags: perl-5.20-transition

There's a couple of hardcoded instances of /usr/lib/perl5 in debhelper
that are soon going to be outdated as $Config{vendorarch} will change
with Perl 5.20.0. See #748380.

While at it, the attached patch also changes instances
of /usr/share/perl5 to expand $Config{vendorlib},
although that is not expected to change (and would be
rather hard to change without arch:all binNMUs.)
-- 
Niko Tyni   nt...@debian.org
>From f5f0c44f74d3ac51fcb5eebb2e366ce1cc2397f8 Mon Sep 17 00:00:00 2001
From: Niko Tyni <nt...@debian.org>
Date: Sat, 31 May 2014 20:50:33 +0300
Subject: [PATCH] Use vendorlib and vendorarch from Config instead of
 hardcoding their values

$Config{vendorarch} is changing with the perl 5.20 packages,
see #748380.
---
 dh_fixperms | 6 +++++-
 dh_perl     | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dh_fixperms b/dh_fixperms
index a99a134..da45ee6 100755
--- a/dh_fixperms
+++ b/dh_fixperms
@@ -7,6 +7,7 @@ dh_fixperms - fix permissions of files in package build directories
 =cut
 
 use strict;
+use Config;
 use Debian::Debhelper::Dh_Lib;
 
 =head1 SYNOPSIS
@@ -44,6 +45,9 @@ up a list of things to exclude.
 
 init();
 
+my $vendorlib = substr $Config{vendorlib}, 1;
+my $vendorarch = substr $Config{vendorarch}, 1;
+
 foreach my $package (@{$dh{DOPACKAGES}}) {
 	my $tmp=tmpdir($package);
 
@@ -89,7 +93,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 		"2>/dev/null | xargs -0r chmod 644");
 	
 	# .. and perl modules.
-	complex_doit("find $tmp/usr/lib/perl5 $tmp/usr/share/perl5 -type f",
+	complex_doit("find $tmp/$vendorarch $tmp/$vendorlib -type f",
 		"-perm -5 -name '*.pm' $find_options -print0",
 		"2>/dev/null | xargs -0r chmod a-X");
 	
diff --git a/dh_perl b/dh_perl
index ddea2cd..ed18f91 100755
--- a/dh_perl
+++ b/dh_perl
@@ -137,7 +137,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 
 	# MakeMaker always makes lib and share dirs, but typically
 	# only one directory is installed into.
-	foreach my $dir ("$tmp/usr/share/perl5", "$tmp/usr/lib/perl5") {
+	foreach my $dir ("$tmp/$vendorlib", "$tmp/$vendorarch") {
 		if (-d $dir) {
 			doit("rmdir", "--ignore-fail-on-non-empty", "--parents",
 				"$dir");
-- 
2.0.0.rc4

Reply via email to