r25155 - in /trunk/libfile-sharedir-perl/debian: changelog control patches/ patches/fix-dist-path.patch patches/series rules

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Sun Sep 14 22:46:46 UTC 2008


Author: dmn
Date: Sun Sep 14 22:46:43 2008
New Revision: 25155

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=25155
Log:
      TODO: investigate the warning during testsuite
* Non-maintainer upload.
* add fix-dist-path.patch, fixing a regression in shared directory layout.
  Closes: #496122

Added:
    trunk/libfile-sharedir-perl/debian/patches/
    trunk/libfile-sharedir-perl/debian/patches/fix-dist-path.patch
    trunk/libfile-sharedir-perl/debian/patches/series
Modified:
    trunk/libfile-sharedir-perl/debian/changelog
    trunk/libfile-sharedir-perl/debian/control
    trunk/libfile-sharedir-perl/debian/rules

Modified: trunk/libfile-sharedir-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-perl/debian/changelog?rev=25155&op=diff
==============================================================================
--- trunk/libfile-sharedir-perl/debian/changelog (original)
+++ trunk/libfile-sharedir-perl/debian/changelog Sun Sep 14 22:46:43 2008
@@ -1,3 +1,13 @@
+libfile-sharedir-perl (0.05-1.2) UNRELEASED; urgency=high
+
+        TODO: investigate the warning during testsuite
+
+  * Non-maintainer upload.
+  * add fix-dist-path.patch, fixing a regression in shared directory layout.
+    Closes: #496122
+
+ -- Damyan Ivanov <dmn at debian.org>  Mon, 15 Sep 2008 01:44:47 +0300
+
 libfile-sharedir-perl (0.05-1.1) unstable; urgency=low
 
   * Non-maintainer upload.

Modified: trunk/libfile-sharedir-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-perl/debian/control?rev=25155&op=diff
==============================================================================
--- trunk/libfile-sharedir-perl/debian/control (original)
+++ trunk/libfile-sharedir-perl/debian/control Sun Sep 14 22:46:43 2008
@@ -1,7 +1,7 @@
 Source: libfile-sharedir-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 5.0.0)
+Build-Depends: debhelper (>= 5.0.0), quilt
 Build-Depends-Indep: perl (>= 5.8.8-12), libclass-inspector-perl, libparams-util-perl
 Maintainer: Christian Sánchez <csanchez at unplug.org.ve>
 Standards-Version: 3.7.3

Added: trunk/libfile-sharedir-perl/debian/patches/fix-dist-path.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-perl/debian/patches/fix-dist-path.patch?rev=25155&op=file
==============================================================================
--- trunk/libfile-sharedir-perl/debian/patches/fix-dist-path.patch (added)
+++ trunk/libfile-sharedir-perl/debian/patches/fix-dist-path.patch Sun Sep 14 22:46:43 2008
@@ -1,0 +1,159 @@
+# fix regression in shared directory layout model
+# patch backported from 1.00 upstream release
+# http://bugs.debian.org/496122
+--- a/lib/File/ShareDir.pm
++++ b/lib/File/ShareDir.pm
+@@ -145,6 +145,44 @@ located or is not readable.
+ 
+ sub dist_dir {
+ 	my $dist = _DIST(shift);
++	my $dir;
++
++	# Try the new version
++	$dir = _dist_dir_new( $dist );
++	return $dir if defined $dir;
++
++	# Fall back to the legacy version
++	$dir = _dist_dir_old( $dist );
++	return $dir if defined $dir;
++
++	# Ran out of options
++	croak("Failed to find share dir for dist '$dist'");
++}
++
++sub _dist_dir_new {
++	my $dist = shift;
++
++	# Create the subpath
++	my $path = File::Spec->catdir(
++		'auto', 'share', 'dist', $dist,
++	);
++
++	# Find the full dir withing @INC
++	foreach my $inc ( @INC ) {
++		next unless defined $inc and ! ref $inc;
++		my $dir = File::Spec->catdir( $inc, $path );
++		next unless -d $dir;
++		unless ( -r $dir ) {
++			croak("Found directory '$dir', but no read permissions");
++		}
++		return $dir;
++	}
++
++	return undef;
++}
++
++sub _dist_dir_old {
++	my $dist = shift;
+ 
+ 	# Create the subpath
+ 	my $path = File::Spec->catdir(
+@@ -162,8 +200,7 @@ sub dist_dir {
+ 		return $dir;
+ 	}
+ 
+-	# Couldn't find it
+-	croak("Failed to find share dir for dist '$dist'");
++	return undef;
+ }
+ 
+ =pod
+@@ -187,6 +224,43 @@ located or is not readable.
+ 
+ sub module_dir {
+ 	my $module = _MODULE(shift);
++	my $dir;
++
++	defined($module) or die "No module given";
++
++	# Try the new version
++	$dir = _module_dir_new( $module );
++	return $dir if defined $dir;
++
++	# Fall back to the legacy version
++	return _module_dir_old( $module );
++}
++
++sub _module_dir_new {
++	my $module = shift;
++
++	# Create the subpath
++	my $path = File::Spec->catdir(
++		'auto', 'share', 'module',
++		_module_subdir( $module ),
++	);
++
++	# Find the full dir withing @INC
++	foreach my $inc ( @INC ) {
++		next unless defined $inc and ! ref $inc;
++		my $dir = File::Spec->catdir( $inc, $path );
++		next unless -d $dir;
++		unless ( -r $dir ) {
++			croak("Found directory '$dir', but no read permissions");
++		}
++		return $dir;
++	}
++
++	return undef;
++}
++
++sub _module_dir_old {
++	my $module = shift;
+ 	my $short  = Class::Inspector->filename($module);
+ 	my $long   = Class::Inspector->loaded_filename($module);
+ 	$short =~ tr{/} {:} if $IS_MACOS;
+@@ -226,8 +300,40 @@ sub dist_file {
+ 	my $dist = _DIST(shift);
+ 	my $file = _FILE(shift);
+ 
++	# Try the new version first
++	my $path = _dist_file_new( $dist, $file );
++	return $path if defined $path;
++
++	# Hand off to the legacy version
++	return _dist_file_old( $dist, $file );;
++}
++
++sub _dist_file_new {
++	my $dist = shift;
++	my $file = shift;
++
++	# If it exists, what should the path be
++	my $dir  = _dist_dir_new( $dist );
++	my $path = File::Spec->catfile( $dir, $file );
++
++	# Does the file exist
++	return undef unless -e $path;
++	unless ( -f $path ) {
++		croak("Found dist_file '$path', but not a file");
++	}
++	unless ( -r $path ) {
++		croak("File '$path', no read permissions");
++	}
++
++	return $path;
++}
++
++sub _dist_file_old {
++	my $dist = shift;
++	my $file = shift;
++
+ 	# Create the subpath
+-	my $path = File::Spec->catdir(
++	my $path = File::Spec->catfile(
+ 		'auto', split( /-/, $dist ), $file,
+ 		);
+ 
+@@ -290,6 +396,12 @@ sub module_file {
+ #####################################################################
+ # Support Functions
+ 
++sub _module_subdir {
++	my $module = shift;
++	$module =~ s/::/-/g;
++	return $module;
++}
++
+ # Matches a valid distribution name
+ ### This is a total guess at this point
+ sub _DIST {

Added: trunk/libfile-sharedir-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-perl/debian/patches/series?rev=25155&op=file
==============================================================================
--- trunk/libfile-sharedir-perl/debian/patches/series (added)
+++ trunk/libfile-sharedir-perl/debian/patches/series Sun Sep 14 22:46:43 2008
@@ -1,0 +1,1 @@
+fix-dist-path.patch

Modified: trunk/libfile-sharedir-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-perl/debian/rules?rev=25155&op=diff
==============================================================================
--- trunk/libfile-sharedir-perl/debian/rules (original)
+++ trunk/libfile-sharedir-perl/debian/rules Sun Sep 14 22:46:43 2008
@@ -1,6 +1,8 @@
 #!/usr/bin/make -f
 
 #export DH_VERBOSE=1
+
+include /usr/share/quilt/quilt.make
 
 export PERL_MM_USE_DEFAULT=1
 
@@ -13,7 +15,7 @@
 TMP     =$(CURDIR)/debian/$(PACKAGE)
 
 build: build-stamp
-build-stamp:
+build-stamp: $(QUILT_STAMPFN)
 	dh_testdir
 
 	$(PERL) Makefile.PL INSTALLDIRS=vendor \
@@ -24,7 +26,7 @@
 
 	touch $@
 
-clean:
+clean: unpatch
 	dh_testdir
 	dh_testroot
 




More information about the Pkg-perl-cvs-commits mailing list