r19813 - in /trunk/dh-make-perl: debian/changelog dh-make-perl

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sat May 10 15:56:17 UTC 2008


Author: gregoa
Date: Sat May 10 15:56:16 2008
New Revision: 19813

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=19813
Log:
* Fix check_for_xs(), thanks to Kevin Ryde for the bug report and the
  patch (closes: #480420).
* Escape dot in exclude pattern, also reported by Kevin Ryde in the same
  bugreport.
* CPAN.pm creates build directories with a random part since 1.88_59; use
  the new CPAN::Distribution::base_id method to get nice directory names
  again (introduced in 1.91_53).
* Initialize $desc to avoid a warning.
* Only mangle $longdesc if it is not empty, avoids results like " .".
* If the directory containing the unpacked tarball already exists rename
  it instead of moving the contents beneath it.
* Slightly improve wording when searching with apt-file.
* Handle errors from moving directories.

Modified:
    trunk/dh-make-perl/debian/changelog
    trunk/dh-make-perl/dh-make-perl

Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=19813&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Sat May 10 15:56:16 2008
@@ -1,3 +1,21 @@
+dh-make-perl (0.44) UNRELEASED; urgency=low
+
+  * Fix check_for_xs(), thanks to Kevin Ryde for the bug report and the
+    patch (closes: #480420).
+  * Escape dot in exclude pattern, also reported by Kevin Ryde in the same
+    bugreport.
+  * CPAN.pm creates build directories with a random part since 1.88_59; use
+    the new CPAN::Distribution::base_id method to get nice directory names
+    again (introduced in 1.91_53).
+  * Initialize $desc to avoid a warning.
+  * Only mangle $longdesc if it is not empty, avoids results like " .".
+  * If the directory containing the unpacked tarball already exists rename
+    it instead of moving the contents beneath it.
+  * Slightly improve wording when searching with apt-file.
+  * Handle errors from moving directories.
+
+ -- gregor herrmann <gregoa at debian.org>  Sat, 10 May 2008 17:48:10 +0200
+
 dh-make-perl (0.43) unstable; urgency=low
 
   [ gregor herrmann ]

Modified: trunk/dh-make-perl/dh-make-perl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/dh-make-perl?rev=19813&op=diff
==============================================================================
--- trunk/dh-make-perl/dh-make-perl (original)
+++ trunk/dh-make-perl/dh-make-perl Sat May 10 15:56:16 2008
@@ -141,7 +141,7 @@
 die usage_instructions() if $opts{help};
 die "CPANPLUS support disabled, sorry" if $opts{cpanplus};
 
-$opts{exclude} = '(?:\/|^)(?:CVS|.svn)\/' if (!defined $opts{exclude} or
+$opts{exclude} = '(?:\/|^)(?:CVS|\.svn)\/' if (!defined $opts{exclude} or
 					  $opts{exclude} eq '');
 
 $arch = $opts{arch} if defined $opts{arch};
@@ -184,6 +184,8 @@
 
 if (defined $opts{desc}) {
   $desc = $opts{desc};
+} else {
+  $desc = '';
 }
 ($pkgname, $version) = extract_basic();
 if (defined $opts{p}) {
@@ -356,8 +358,19 @@
 
 		copy ($tarball, $ENV{'PWD'});
 		$tarball = $ENV{'PWD'} . "/" . basename($tarball);
-	        $new_maindir = $ENV{PWD}."/".basename($maindir);
-		`mv "$maindir" "$new_maindir"`;
+		# build_dir contains a random part since 1.88_59
+		# use the new CPAN::Distribution::base_id (introduced in 1.91_53)
+	        $new_maindir = $ENV{PWD} . "/" . (
+	        	$cpanversion < 1.9153 ? basename($maindir) : $dist->base_id
+		);
+		# rename existing directory
+		if (-d $new_maindir && system("mv", "$new_maindir", "$new_maindir.$$") == 0) {
+		        print '='x70,"\n";
+			print "Unpacked tarball already existed, directory renamed to $new_maindir.$$\n";
+		        print '='x70,"\n";
+		}
+		system("mv", "$maindir", "$new_maindir") == 0 
+			or die "Failed to move $maindir to $new_maindir: $!";
 		$maindir = $new_maindir;
 
 	} elsif ($opts{cpanplus}) {
@@ -640,6 +653,7 @@
 			|| $parser->get('DETAILS')
 			|| $desc
 			|| ''; # Just to avoid warnings...
+	} else {
 		$longdesc =~ s/^\s+//s;
 		$longdesc =~ s/\s+$//s;
 		$longdesc =~ s/^\t/ /mg;
@@ -767,7 +781,7 @@
 		}
 
 		$mod = $module;
-		print "Searching for $module package using apt-file.\n";
+		print "Searching for package containing $module using apt-file.\n";
 		$module =~ s|::|/|g;
 
 		# Regex's to search the return of apt-file to find the right pkg
@@ -887,7 +901,7 @@
 }
 
 sub check_for_xs {
-	(! $opts{exclude} || ! $File::Find::name =~ /$opts{exclude}/) && /\.(xs|c|cpp|cxx)$/i && do {
+	(! $opts{exclude} or $File::Find::name !~ /$opts{exclude}/) && /\.(xs|c|cpp|cxx)$/i && do {
 		$arch = 'any';
 	};
 }




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