Selaa lähdekoodia

Unset TAR_OPTIONS when handling tar archives for source packages

The command line interface is the only way that should control tar's
behaviour in its usage by dpkg as we want the same behaviour for
everybody.
Raphael Hertzog 17 vuotta sitten
vanhempi
commit
bbb33e5b82
2 muutettua tiedostoa jossa 7 lisäystä ja 0 poistoa
  1. 5 0
      debian/changelog
  2. 2 0
      scripts/Dpkg/Source/Archive.pm

+ 5 - 0
debian/changelog

@@ -1,7 +1,12 @@
 dpkg (1.15.3) UNRELEASED; urgency=low
 dpkg (1.15.3) UNRELEASED; urgency=low
 
 
+  [ Guillem Jover ]
   * Unset TAR_OPTIONS when extracting .deb archives. Closes: #530860
   * Unset TAR_OPTIONS when extracting .deb archives. Closes: #530860
 
 
+  [ Raphael Hertzog ]
+  * Unset TAR_OPTIONS when creating/extracting tar archives for source
+    packages. Closes: #530860
+
  -- Guillem Jover <guillem@debian.org>  Tue, 26 May 2009 01:26:04 +0200
  -- Guillem Jover <guillem@debian.org>  Tue, 26 May 2009 01:26:04 +0200
 
 
 dpkg (1.15.2) unstable; urgency=low
 dpkg (1.15.2) unstable; urgency=low

+ 2 - 0
scripts/Dpkg/Source/Archive.pm

@@ -45,6 +45,7 @@ sub create {
     $fork_opts{"to_handle"} = $self->open_for_write();
     $fork_opts{"to_handle"} = $self->open_for_write();
     $fork_opts{"from_pipe"} = \$self->{'tar_input'};
     $fork_opts{"from_pipe"} = \$self->{'tar_input'};
     # Call tar creation process
     # Call tar creation process
+    $fork_opts{"delete_env"} = [ "TAR_OPTIONS" ];
     $fork_opts{'exec'} = [ 'tar', '--null', '-T', '-', '--numeric-owner',
     $fork_opts{'exec'} = [ 'tar', '--null', '-T', '-', '--numeric-owner',
                            '--owner', '0', '--group', '0',
                            '--owner', '0', '--group', '0',
 			   @{$opts{"options"}}, '-cf', '-' ];
 			   @{$opts{"options"}}, '-cf', '-' ];
@@ -117,6 +118,7 @@ sub extract {
     $fork_opts{"from_handle"} = $self->open_for_read();
     $fork_opts{"from_handle"} = $self->open_for_read();
 
 
     # Call tar extraction process
     # Call tar extraction process
+    $fork_opts{"delete_env"} = [ "TAR_OPTIONS" ];
     $fork_opts{'exec'} = [ 'tar', '--no-same-owner', '--no-same-permissions',
     $fork_opts{'exec'} = [ 'tar', '--no-same-owner', '--no-same-permissions',
                            @{$opts{"options"}}, '-xkf', '-' ];
                            @{$opts{"options"}}, '-xkf', '-' ];
     fork_and_exec(%fork_opts);
     fork_and_exec(%fork_opts);