[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#752346: graphviz: hardcodes /usr/lib/perl5



Control: tag -1 patch

-=| Niko Tyni, 22.06.2014 23:03:21 +0300 |=-
> Package: graphviz
> Version: 2.26.3-17
> Severity: important
> User: debian-perl@lists.debian.org
> Usertags: perl-5.20-transition
> 
> Starting with version 5.20.0 (currently in experimental), the Debian
> perl package is changing the "vendorarch" library path (currently
> /usr/lib/perl5) to include the multiarch triplet and the perl version. See
> #748380 for details.
> 
> For this to work, packages containing binary perl modules need to migrate
> from using the hardcoded /usr/lib/perl5 directory to the value of the
> $Config{vendorarch} variable, as defined in the 'Config' module.
> 
> This package builds successfully with perl_5.20.0-1 from experimental,
> but still installs the Perl files into /usr/lib/perl5 so they won't be
> on the Perl search path anymore.

Attached is a patch that makes use of $Config{vendorarch} in 
libgv-perl.install. Note that even though the original file used 
${DEB_HOST_MULTIARCH}, $Config{vendorarch} is still better, as the 
later may also change with different perl releases.

Cheers,
    dam
diff --git a/debian/libgv-perl.install b/debian/libgv-perl.install
index f607d6c..933d15e 100755
--- a/debian/libgv-perl.install
+++ b/debian/libgv-perl.install
@@ -1,5 +1,8 @@
-#! /usr/bin/dh-exec --with-scripts=subst-multiarch
-usr/lib/*/graphviz/perl/gv.pm         usr/lib/perl5
-usr/lib/*/graphviz/perl/gv.so         usr/lib/${DEB_HOST_MULTIARCH}/perl5/auto/gv
-usr/lib/*/graphviz/perl/libgv_perl.so usr/lib/${DEB_HOST_MULTIARCH}/perl5/auto/gv
-usr/share/man/man3/gv.3perl
+#! /usr/bin/perl
+use Config;
+my $vendorarch = substr( $Config{vendorarch}, 1 );
+
+print "usr/lib/*/graphviz/perl/gv.pm         $vendorarch\n";
+print "usr/lib/*/graphviz/perl/gv.so         $vendorarch/auto/gv\n";
+print "usr/lib/*/graphviz/perl/libgv_perl.so $vendorarch/auto/gv\n";
+print "usr/share/man/man3/gv.3perl\n";

Reply to: