Put in a workaround for bug #479317, an incompatability in perl 5.10 that causes...
authorJoey Hess <joey@kodama.kitenet.net>
Sun, 4 May 2008 18:44:34 +0000 (14:44 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Sun, 4 May 2008 18:44:34 +0000 (14:44 -0400)
debian/changelog
pristine-tar

index ec266b53aca65fa7c22b0a4a22699b9249d74609..65790b52d23b58abe3671e2a591ab4aa335f4018 100644 (file)
@@ -2,6 +2,9 @@ pristine-tar (0.14) UNRELEASED; urgency=low
 
   * Use debhelper v7; rules file minimisation.
   * Add build and install targets to Makefile.
+  * Put in a workaround for bug #479317, an incompatability in perl 5.10
+    that causes nonzero exit if a program exits while chdired into a
+    subdirectory of a File::Temp temp directory.
 
  -- Joey Hess <joeyh@debian.org>  Thu, 24 Apr 2008 02:05:47 -0400
 
index 920069e80d75269bb8fe0c91dc4868c43719cf48..5456436172cc25a5945ac30aeb169edca55b8971 100755 (executable)
@@ -178,6 +178,11 @@ sub tempdir {
                TMPDIR => 1, CLEANUP => !$keep);
 }
 
+# Workaround for bug #479317 in perl 5.10.
+sub END {
+       chdir("/");
+}
+
 sub recreatetarball {
        my $tempdir=shift;
        my $source=shift;
@@ -240,7 +245,7 @@ sub recreatetarball {
                doit("cp", "-a", $source, "$tempdir/workdir$subdir");
        }
        else {
-               doit("cp", "-a", $source, "$tempdir/workdir$subdir");
+               doit("mv", $source, "$tempdir/workdir$subdir");
        }
 
        # It's important that this create an identical tarball each time
@@ -712,7 +717,6 @@ sub commit {
 sub checkout {
        my $tarball=shift;
        
-       my $tempdir=tempdir();
        my ($delta, $id)=checkoutdelta($tarball);
        my ($sourcedir, undef)=export($id);
        my $pid = open(GENTAR, "|-");