diff options
author | Niko Tyni <ntyni@debian.org> | 2014-05-31 20:50:33 +0300 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-08-09 11:26:29 -0400 |
commit | 8a0b3cb3924374e2fd114bd3f5407f7a43d2a0e9 (patch) | |
tree | 8098dd8eb16c3d00443089e94af7f08a212f18e1 | |
parent | 343d8cb32be1b386686cf9b5dceec9c3c5a8104c (diff) |
Use vendorlib and vendorarch from Config instead of hardcoding their values
$Config{vendorarch} is changing with the perl 5.20 packages,
see #748380.
-rwxr-xr-x | dh_fixperms | 6 | ||||
-rwxr-xr-x | dh_perl | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/dh_fixperms b/dh_fixperms index a99a1345..da45ee64 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"); @@ -141,7 +141,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"); |